Commit e038ef09 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] devsf_mk_dir() callers cleanup

	almost all remaining callers of devfs_mk_dir() are passing absolute
pathname now.
parent 191038b1
......@@ -303,13 +303,13 @@ register_with_devfs(void)
/* FIXME: don't forget /dev/pci/mem & /dev/pci/io */
pci_for_each_dev(dev) {
sprintf(devfs_path, "%02x/%02x.%x",
sprintf(devfs_path, "pci/%02x/%02x.%x",
dev->bus->number,
PCI_SLOT(dev->devfn),
PCI_FUNC(dev->devfn));
device_dir_handle =
devfs_mk_dir(pciba_devfs_handle, devfs_path, NULL);
devfs_mk_dir(NULL, devfs_path, NULL);
if (device_dir_handle == NULL)
return failure;
......
......@@ -161,9 +161,9 @@ devfs_handle_t tape_devfs_root_entry;
static inline devfs_handle_t
tape_mkdevfsroot (tape_dev_t* td)
{
char devno [5];
sprintf (devno,"%04x",td->devinfo.devno);
return (td->devfs_dir=devfs_mk_dir (tape_devfs_root_entry, devno, td));
char devno [10];
sprintf (devno,"tape/%04x",td->devinfo.devno);
return (td->devfs_dir=devfs_mk_dir (NULL, devno, NULL));
}
/*
......
......@@ -48,7 +48,9 @@ static request_queue_t* tapeblock_getqueue (kdev_t kdev);
devfs_handle_t
tapeblock_mkdevfstree (tape_dev_t* td) {
devfs_handle_t rc=NULL;
rc=td->blk_data.devfs_block_dir=devfs_mk_dir (td->devfs_dir, "block", td);
char name[16];
sprintf (name, "tape/%04x/block", td->devinfo.devno);
rc=td->blk_data.devfs_block_dir=devfs_mk_dir (NULL, name, NULL);
if (rc==NULL) goto out_undo;
rc=td->blk_data.devfs_disc=devfs_register(td->blk_data.devfs_block_dir, "disc",DEVFS_FL_DEFAULT,
tapeblock_major, td->first_minor,
......
......@@ -63,7 +63,9 @@ int tapechar_major = TAPECHAR_MAJOR;
devfs_handle_t
tapechar_mkdevfstree (tape_dev_t* td) {
devfs_handle_t rc=NULL;
rc=td->char_data.devfs_char_dir=devfs_mk_dir (td->devfs_dir, "char", td);
char name[15];
sprintf (name, "tape/%04x/char", td->devinfo.devno);
rc=td->char_data.devfs_char_dir=devfs_mk_dir (NULL, name, NULL);
if (rc==NULL) goto out_undo;
rc=td->char_data.devfs_nonrewinding=devfs_register(td->char_data.devfs_char_dir,
"nonrewinding",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment