mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: jordan.breeding@attbi.com
To: Daniele Pala <dandario@libero.it>
Cc: Christoph Hellwig <hch@lst.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remove devfs_register
Date: Thu, 08 May 2003 21:43:44 +0000	[thread overview]
Message-ID: <S262136AbTEHVbN/20030508213113Z+6367@vger.kernel.org> (raw)

I believe that is devfs_mk_{bdev,cdev}.

Jordan
> ouch! sorry i'm pretty retarded. What is used now instead of devfs_register?
> Thanks,
> 	
> 	Daniele
> 
> 
> 
> On Thu, May 08, 2003 at 10:34:49PM +0200, Christoph Hellwig wrote:
> > Whee! devfs_register isn't used anymore in the whole tree and with
> > it some other devfs crap.  Kill it for good.
> > 
> > 
> > --- 1.45/include/linux/devfs_fs_kernel.h	Fri May  2 09:55:04 2003
> > +++ edited/include/linux/devfs_fs_kernel.h	Thu May  8 21:09:11 2003
> > @@ -11,20 +11,7 @@
> >  
> >  #define DEVFS_SUPER_MAGIC                0x1373
> >  
> > -#define DEVFS_FL_NONE           0x000 /* This helps to make code more 
> readable
> > -				         no, it doesn't  --hch */
> > -#define DEVFS_FL_DEFAULT        DEVFS_FL_NONE
> > -
> > -
> > -typedef struct devfs_entry * devfs_handle_t;
> > -
> > -struct gendisk;
> > -
> >  #ifdef CONFIG_DEVFS_FS
> > -extern devfs_handle_t devfs_register (devfs_handle_t dir, const char *name,
> > -				      unsigned int flags,
> > -				      unsigned int major, unsigned int minor,
> > -				      umode_t mode, void *ops, void *info);
> >  extern int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...)
> >  	__attribute__((format (printf, 3, 4)));
> >  extern int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
> > @@ -36,19 +23,8 @@
> >  	__attribute__((format (printf, 1, 2)));
> >  extern int devfs_register_tape(const char *name);
> >  extern void devfs_unregister_tape(int num);
> > -extern void devfs_register_partition(struct gendisk *dev, int part);
> >  extern void mount_devfs_fs(void);
> >  #else  /*  CONFIG_DEVFS_FS  */
> > -static inline devfs_handle_t devfs_register (devfs_handle_t dir,
> > -					     const char *name,
> > -					     unsigned int flags,
> > -					     unsigned int major,
> > -					     unsigned int minor,
> > -					     umode_t mode,
> > -					     void *ops, void *info)
> > -{
> > -    return NULL;
> > -}
> >  static inline int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, 
> ...)
> >  {
> >  	return 0;
> > @@ -73,9 +49,6 @@
> >      return -1;
> >  }
> >  static inline void devfs_unregister_tape(int num)
> > -{
> > -}
> > -static inline void devfs_register_partition(struct gendisk *dev, int part)
> >  {
> >  }
> >  static inline void mount_devfs_fs (void)
> > --- 1.88/fs/devfs/base.c	Fri May  2 09:55:04 2003
> > +++ edited/fs/devfs/base.c	Thu May  8 21:09:58 2003
> > @@ -752,6 +752,7 @@
> >  #  define DPRINTK(flag, format, args...)
> >  #endif
> >  
> > +typedef struct devfs_entry *devfs_handle_t;
> >  
> >  struct directory_type
> >  {
> > @@ -1424,98 +1425,6 @@
> >  			 current->egid, &fs_info);
> >  } 
> >  
> > -
> > -/**
> > - *	devfs_register - Register a device entry.
> > - *	@dir: The handle to the parent devfs directory entry. If this is %NULL 
> the
> > - *		new name is relative to the root of the devfs.
> > - *	@name: The name of the entry.
> > - *	@flags: Must be 0
> > - *	@major: The major number. Not needed for regular files.
> > - *	@minor: The minor number. Not needed for regular files.
> > - *	@mode: The default file mode.
> > - *	@ops: The &file_operations or &block_device_operations structure.
> > - *		This must not be externally deallocated.
> > - *	@info: An arbitrary pointer which will be written to the @private_data
> > - *		field of the &file structure passed to the device driver. You 
> can set
> > - *		this to whatever you like, and change it once the file is opened 
> (the next
> > - *		file opened will not see this change).
> > - *
> > - *	On failure %NULL is returned.
> > - */
> > -
> > -devfs_handle_t devfs_register (devfs_handle_t dir, const char *name,
> > -			       unsigned int flags,
> > -			       unsigned int major, unsigned int minor,
> > -			       umode_t mode, void *ops, void *info)
> > -{
> > -    int err;
> > -    dev_t devnum = 0, dev = MKDEV(major, minor);
> > -    struct devfs_entry *de;
> > -
> > -    /* we don't accept any flags anymore.  prototype will change soon. */
> > -    WARN_ON(flags);
> > -    WARN_ON(dir);
> > -    WARN_ON(!S_ISCHR(mode));
> > -
> > -    if (name == NULL)
> > -    {
> > -	PRINTK ("(): NULL name pointer\n");
> > -	return NULL;
> > -    }
> > -    if (ops == NULL)
> > -    {
> > -	PRINTK ("(%s): NULL ops pointer\n", name);
> > -	return NULL;
> > -    }
> > -    if ( S_ISDIR (mode) )
> > -    {
> > -	PRINTK ("(%s): creating directories is not allowed\n", name);
> > -	return NULL;
> > -    }
> > -    if ( S_ISLNK (mode) )
> > -    {
> > -	PRINTK ("(%s): creating symlinks is not allowed\n", name);
> > -	return NULL;
> > -    }
> > -    if ( ( de = _devfs_prepare_leaf (&dir, name, mode) ) == NULL )
> > -    {
> > -	PRINTK ("(%s): could not prepare leaf\n", name);
> > -	if (devnum) devfs_dealloc_devnum (mode, devnum);
> > -	return NULL;
> > -    }
> > -    if (S_ISCHR (mode)) {
> > -	de->u.cdev.dev = dev;
> > -	de->u.cdev.autogen = devnum != 0;
> > -	de->u.cdev.ops = ops;
> > -    } else if (S_ISBLK (mode)) {
> > -	de->u.bdev.dev = dev;
> > -	de->u.cdev.autogen = devnum != 0;
> > -    } else {
> > -	PRINTK ("(%s): illegal mode: %x\n", name, mode);
> > -	devfs_put (de);
> > -	devfs_put (dir);
> > -	return (NULL);
> > -    }
> > -    de->info = info;
> > -    de->inode.uid = 0;
> > -    de->inode.gid = 0;
> > -    err = _devfs_append_entry(dir, de, NULL);
> > -    if (err)
> > -    {
> > -	PRINTK ("(%s): could not append to parent, err: %d\n", name, err);
> > -	devfs_put (dir);
> > -	if (devnum) devfs_dealloc_devnum (mode, devnum);
> > -	return NULL;
> > -    }
> > -    DPRINTK (DEBUG_REGISTER, "(%s): de: %p dir: %p \"%s\"  pp: %p\n",
> > -	     name, de, dir, dir->name, dir->parent);
> > -    devfsd_notify (de, DEVFSD_NOTIFY_REGISTERED);
> > -    devfs_put (dir);
> > -    return de;
> > -}   /*  End Function devfs_register  */
> > -
> > -
> >  int devfs_mk_bdev(dev_t dev, umode_t mode, const char *fmt, ...)
> >  {
> >  	struct devfs_entry *dir = NULL, *de;
> > @@ -1935,7 +1844,6 @@
> >  __setup("devfs=", devfs_setup);
> >  
> >  EXPORT_SYMBOL(devfs_put);
> > -EXPORT_SYMBOL(devfs_register);
> >  EXPORT_SYMBOL(devfs_mk_symlink);
> >  EXPORT_SYMBOL(devfs_mk_dir);
> >  EXPORT_SYMBOL(devfs_remove);
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

             reply	other threads:[~2003-05-08 21:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-08 21:43 jordan.breeding [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-08 20:34 Christoph Hellwig
2003-05-08 17:18 ` Daniele Pala
2003-05-08 21:48 ` Andrew Morton
2003-05-08 23:44   ` Jesse Barnes
2003-05-09  5:37   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=S262136AbTEHVbN/20030508213113Z+6367@vger.kernel.org \
    --to=jordan.breeding@attbi.com \
    --cc=dandario@libero.it \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®