lkml.org 
[lkml]   [2000]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Printing the messages through printk while using Xwindows.
    before people blame me for corrupting their filesystems, here is a hint:

    registering a filesystem doesn't give you moral right to attempt to mount
    it :)

    seriously though, FS_SINGLE filesystems must be kern_mount()'d before they
    can be user-mounted so if you try to usermount the filesystem below you
    will get an oops for a well-known reason (nothing to do with terminals or
    X :) (and after the oops you won't be able to umount any filesystems so
    fsck will be inevitable)

    Regards,
    Tigran

    On Fri, 28 Jul 2000, Tigran Aivazian wrote:

    > On Fri, 28 Jul 2000, Russell King wrote:
    > > Therefore, its fine if you've got one of the few cards that fbcon
    > > works with. Otherwise you're using vgacon, and it doesn't work.
    >
    > It does actually work on plain vga without any fb support at all. Try it
    > and see. Here is a little ready-to-compile module for you to try.
    >
    > Regards,
    > Tigran
    >
    > #define __KERNEL__
    > #define MODULE
    >
    > #include <linux/module.h>
    > #include <linux/init.h>
    > #include <linux/sched.h>
    >
    > print_string(char *str)
    > {
    > struct tty_struct *tty = current->tty;
    >
    > (*tty->driver.write)(tty, 0, str, strlen(str));
    > (*tty->driver.write)(tty, 0, "\015\012", 2);
    > }
    >
    >
    > static struct super_block *
    > single_read_super(struct super_block *s, void *data, int silent)
    > {
    > char buf[100];
    > sprintf(buf, "comm=%s\n", current->comm);
    > print_string(buf);
    > return NULL;
    > }
    >
    > static DECLARE_FSTYPE(single_fs_type, "single", single_read_super, FS_SINGLE);
    >
    > static int __init init_single_fs(void)
    > {
    > char buf[100];
    > int ret = register_filesystem(&single_fs_type);
    >
    > printk(KERN_ERR "init_single_fs(): ret = %d\n", ret);
    > sprintf(buf, "comm=%s\n", current->comm);
    > print_string(buf);
    > return ret;
    > }
    >
    > static void __exit exit_single_fs(void)
    > {
    > char buf[100];
    > sprintf(buf, "comm=%s\n", current->comm);
    > print_string(buf);
    > unregister_filesystem(&single_fs_type);
    > }
    >
    > module_init(init_single_fs);
    > module_exit(exit_single_fs);
    >
    >


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:57    [W:0.024 / U:152.680 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site