]> git.neil.brown.name Git - history.git/commitdiff
device model: Need to back up one more directory when creating the symlink between...
authorPatrick Mochel <mochel@geena.pdx.osdl.net>
Tue, 28 May 2002 04:57:54 +0000 (21:57 -0700)
committerPatrick Mochel <mochel@geena.pdx.osdl.net>
Tue, 28 May 2002 04:57:54 +0000 (21:57 -0700)
drivers/base/fs.c

index cb5047cbd5dad4bbf5ccc4aba5eff1389d12f851..754d789f53e89bf535b9652e0ab03380a1e4f3a5 100644 (file)
@@ -127,10 +127,11 @@ int device_bus_link(struct device * dev)
        length = get_devpath_length(dev);
 
        /* now add the path from the bus directory
-        * It should be '../..' (one to get to the 'bus' directory,
-        * and one to get to the root of the fs.
+        * It should be '../../..' (one to get to the bus's directory,
+        * one to get to the 'bus' directory, and one to get to the root 
+        * of the fs.)
         */
-       length += strlen("../..");
+       length += strlen("../../..");
 
        if (length > PATH_MAX)
                return -ENAMETOOLONG;
@@ -140,7 +141,7 @@ int device_bus_link(struct device * dev)
        memset(path,0,length);
 
        /* our relative position */
-       strcpy(path,"../..");
+       strcpy(path,"../../..");
 
        fill_devpath(dev,path,length);
        error = create_symlink(&dev->bus->device_dir,dev->bus_id,path);