1. 27 Apr, 2005 40 commits
    • dsteklof@us.ibm.com's avatar
      [PATCH] pre-libsysfs-0.4.0 patch · 5d4754f1
      dsteklof@us.ibm.com authored
      I am sending you a pre-release patch. It's everything that's in our
      current CVS tree. It adds the functionality you've been looking for. Please
      play with this before checking it into your tree, I'd like to know if
      it's ok with you or if you find problems. I have tested this out with
      test.all and the perl regression test. Let me know what you think.
      
      Still need to do more testing for our work and add some more functions
      related to the changes.
      
      I've gone into namedev.c and udev-add.c to make the necessary changes
      in line with the library. I have not gone and edited any of the "extras".
      
      
      Changes:
      
      1) Libsysfs object structures work more as handles now, their included
      directories or devices are labeled private. If you need attributes
      from a sysfs_class_device, call the available function and don't access
      the directory directly. Same holds true for a sysfs_class_device
      sysfs_device. Do not access the link directly but call the function
      sysfs_get_classdev_device() instead. We only populate entries upon
      request, makes things faster and uses less memory.
      
      2) Added sysfs_get_classdev_parent() as requested.
      
      3) Changed getpagesize to sysconf.
      
      4) Added sysfs_refresh_attributes function for refreshing views of
      attribute lists. We still need to add refresh for links and subdirs. All
      udev needs to do is keep calling sysfs_get_classdev_attr() and that will
      internally call the refresh routine.
      
      5d4754f1
    • greg@kroah.com's avatar
    • olh@suse.de's avatar
      [PATCH] use udevdir in udev.conf · 18a0d652
      olh@suse.de authored
      udevdir is a define, but udev.conf has a hardcoded path. Maybe this
      config file should be generated on the fly, like shown below.
      
      18a0d652
    • greg@kroah.com's avatar
    • kay.sievers@vrfy.org's avatar
      [PATCH] man-page mention multiple symlinks · 26004fcc
      kay.sievers@vrfy.org authored
      As usual, when the stuff gets in the tree - here is a small
      man page update and a TODO line removal.
      
        mention multiple symlinks
        update example with silly symlink rule :)
        shorten example line to have less than 80 chars
        remove "want symlink support" from TODO
      
      26004fcc
    • greg@kroah.com's avatar
      babad3ff
    • greg@kroah.com's avatar
    • greg@kroah.com's avatar
      197eda9a
    • greg@kroah.com's avatar
      62adf3f7
    • christophe.varoqui@free.fr's avatar
      [PATCH] and more extras/multipath updates · 197a978e
      christophe.varoqui@free.fr authored
      * configure the multipath target with round-robin path selector and
      conservative default for a start : yes it makes this release the first
      really useful one.
      * temporarily disable map creation for single path device due to current
      restrictive defaults in the kernel target. Sistina should work it out.
      * correct the strncmp logic in blacklist function.
      
      Tested on StorageWorks with 2.6.0-test10-udm1 :
      
      xa-s03:~# ./multipath -v
      60001fe1000bdad0000903507109004b (1 0 1 1) /dev/sda op:1 /dev/sda
      [HSG80           ]
      60001fe1000bdad000090371312100bf (1 0 1 2) /dev/sdb op:1 /dev/sdb
      [HSG80           ]
      60001fe1000bdad000090371312100c2 (1 0 1 3) /dev/sdc op:1 /dev/sdc
      [HSG80           ]
      60001fe1000bdad00009037131210067 (1 0 2 1) /dev/sdd op:1 /dev/sdd
      [HSG80           ]
      60001fe1000bdad000090371312100b3 (1 0 2 2) /dev/sde op:1 /dev/sde
      [HSG80           ]
      60001fe1000bdad00009035071090024 (1 0 2 3) /dev/sdf op:1 /dev/sdf
      [HSG80           ]
      600508b4000156d700012000000b0000 (1 0 3 1) /dev/sdg op:1 /dev/sdg
      [HSV110 (C)COMPAQ]
      600508b4000156c30001200000210000 (1 0 3 2) /dev/sdh op:1 /dev/sdh
      [HSV110 (C)COMPAQ]
      600508b4000156d700012000000b0000 (1 0 6 1) /dev/sdi op:1 /dev/sdi
      [HSV110 (C)COMPAQ]
      600508b4000156c30001200000210000 (1 0 6 2) /dev/sdj op:1 /dev/sdj
      [HSV110 (C)COMPAQ]
      
      60001fe1000bdad0000903507109004b
       \_(1 0 1 1) /dev/sda op:1 /dev/sda [HSG80           ]
      60001fe1000bdad000090371312100bf
       \_(1 0 1 2) /dev/sdb op:1 /dev/sdb [HSG80           ]
      60001fe1000bdad000090371312100c2
       \_(1 0 1 3) /dev/sdc op:1 /dev/sdc [HSG80           ]
      60001fe1000bdad00009037131210067
       \_(1 0 2 1) /dev/sdd op:1 /dev/sdd [HSG80           ]
      60001fe1000bdad000090371312100b3
       \_(1 0 2 2) /dev/sde op:1 /dev/sde [HSG80           ]
      60001fe1000bdad00009035071090024
       \_(1 0 2 3) /dev/sdf op:1 /dev/sdf [HSG80           ]
      600508b4000156d700012000000b0000
       \_(1 0 3 1) /dev/sdg op:1 /dev/sdg [HSV110 (C)COMPAQ]
       \_(1 0 6 1) /dev/sdi op:1 /dev/sdi [HSV110 (C)COMPAQ]
      600508b4000156c30001200000210000
       \_(1 0 3 2) /dev/sdh op:1 /dev/sdh [HSV110 (C)COMPAQ]
       \_(1 0 6 2) /dev/sdj op:1 /dev/sdj [HSV110 (C)COMPAQ]
      
      N|600508b4000156d700012000000b0000 : 0 4194304 multipath 2 2 10
      round-robin 2 /dev/sdg 10 2 1 2 /dev/sdi 10 2 1 2
      N|600508b4000156c30001200000210000 : 0 20971520 multipath 2 2 10
      round-robin 2 /dev/sdh 10 2 1 2 /dev/sdj 10 2 1 2
      xa-s03:~# dmsetup ls
      600508b4000156c30001200000210000        (254, 1)
      600508b4000156d700012000000b0000        (254, 0)
      xa-s03:~# ll /dev/mapper/
      total 0
      brw-------    1 root     root     254,   1 Dec  9 22:57
      600508b4000156c30001200000210000
      brw-------    1 root     root     254,   0 Dec  9 22:57
      600508b4000156d700012000000b0000
      crw-------    1 root     root      10,  63 Jul 25 22:48 control
      xa-s03:~# dd if=/dev/mapper/600508b4000156c30001200000210000
      of=/dev/null bs=1M count=500
      500+0 records in
      500+0 records out
      524288000 bytes transferred in 5.662530 seconds (92589003 bytes/sec)
      
      gee, that pretty fast :)
      
      197a978e
    • christophe.varoqui@free.fr's avatar
      [PATCH] more extras/multipath updates · 61f76f5c
      christophe.varoqui@free.fr authored
      * update the Makefiles to autodetect libgcc.a & gcc includes
      "ulibc-style". Factorisation of udevdirs & others niceties
      * drop a hint about absent /dev/sd? on failed open() for poor Debian
      users who don't imagine their favorite distro with only 16 preconfigured
      SCSI device nodes :)
      
      61f76f5c
    • kay.sievers@vrfy.org's avatar
      [PATCH] allow multiple symlinks · 4763256c
      kay.sievers@vrfy.org authored
      Here is a patch to allow the creation of multiple symlinks.
      The names must be separated by a space character.
      
      
      REPLACE, KERNEL="ttyUSB0", NAME="visor", SYMLINK="first-%n second-%n third-%n"
      
      results in:
      
      Dec  9 05:28:51 pim udev[12019]: create_node: mknod(udev-root/visor, 020666, 188, 0)
      Dec  9 05:28:51 pim udev[12019]: create_node: symlink 'udev-root/first-0' to node 'visor' requested
      Dec  9 05:28:51 pim udev[12019]: create_node: symlink(./visor, udev-root/first-0)
      Dec  9 05:28:51 pim udev[12019]: create_node: symlink 'udev-root/second-0' to node 'visor' requested
      Dec  9 05:28:51 pim udev[12019]: create_node: symlink(./visor, udev-root/second-0)
      Dec  9 05:28:51 pim udev[12019]: create_node: symlink 'udev-root/third-0' to node 'visor' requested
      Dec  9 05:28:51 pim udev[12019]: create_node: symlink(./visor, udev-root/third-0)
      
      4763256c
    • greg@kroah.com's avatar
    • kay.sievers@vrfy.org's avatar
      [PATCH] cleanup man & remove symlink comment · c6c13c31
      kay.sievers@vrfy.org authored
        remove "want symlinks" text from udev-add.c
        mention SYMLINK in man page
        man page format cleanup
        man page example for SYMLINK
      
      c6c13c31
    • greg@kroah.com's avatar
    • greg@kroah.com's avatar
      [PATCH] change USE_DBUS to DBUS in Makefile, and disable it by default as it's... · bbd063b5
      greg@kroah.com authored
      [PATCH] change USE_DBUS to DBUS in Makefile, and disable it by default as it's still to hard to build on all systems.
      
      bbd063b5
    • greg@kroah.com's avatar
    • greg@kroah.com's avatar
      [PATCH] move all of the DBUS logic into one file and remove all of the #ifdef... · 7ac0feeb
      greg@kroah.com authored
      [PATCH] move all of the DBUS logic into one file and remove all of the #ifdef crud from the main code.
      
      7ac0feeb
    • david@fubar.dk's avatar
      [PATCH] D-BUS patch for udev-008 · 5aebfbcb
      david@fubar.dk authored
      Attached is a patch against udev-008 to send out a D-BUS message when a
      device node is added or removed.
      
      Using D-BUS lingo, udev acquires the org.kernel.udev service and sends
      out a NodeCreated or NodeDeleted signal on the
      org.kernel.udev.NodeMonitor interface. Each signal carries two
      parameters: the node in question and the corresponding sysfs path.
      
      [Note: the D-BUS concepts of service, interface, object can be a bit
      confusing at first glance]
      
      An example program listening for these messages looks like this
      
      #!/usr/bin/python
      
      import dbus
      import gtk
      
      def udev_signal_received(dbus_iface, member, service, object_path, message):
          [filename, sysfs_path] = message.get_args_list()
          if member=='NodeCreated':
              print 'Node %s created for %s'%(filename, sysfs_path)
          elif member=='NodeDeleted':
              print 'Node %s deleted for %s'%(filename, sysfs_path)
      
      def main():
          bus = dbus.Bus(dbus.Bus.TYPE_SYSTEM)
          bus.add_signal_receiver(udev_signal_received,
                                  'org.kernel.udev.NodeMonitor',  # interface
                                  'org.kernel.udev',              # service
                                  '/org/kernel/udev/NodeMonitor') # object
      
          gtk.mainloop()
      
      if __name__ == '__main__':
          main()
      
      and this is the output when hot-plugging some usb-storage.
      
      [david@laptop udev-008]$ ~/node_monitor.py
      Node /udev/sda created for /block/sda
      Node /udev/sda1 created for /block/sda/sda1
      Node /udev/sda1 deleted for /block/sda/sda1
      Node /udev/sda deleted for /block/sda
      
      The patch requires D-BUS 0.20 or later while the python example program
      requires D-BUS from CVS as I only recently applied a patch against the
      python bindings.
      
      5aebfbcb
    • kay.sievers@vrfy.org's avatar
      [PATCH] experimental (very simple) SYMLINK creation · 3d150dfb
      kay.sievers@vrfy.org authored
      > > here is a experimental symlink creation patch - for discussion,
      > > in which direction we should go.
      > > It is possible now to define SYMLINK= after the NAME= in udev.rules.
      > > The link is relative to the node, but the path is not optimized now
      > > if the node and the link are in the same nested directory.
      > > Only one link is supported, cause i need to sleep now :)
      > >
      > > 06-simple-symlink-creation.diff
      > >   simple symlink creation
      > >   reorganized udev-remove to have access to the symlink field
      > >   subdir creation/removal are functions now
      > >   udev-test.pl tests for link creation/removal
      
      Here is a new version with relative link target path optimization
      an better tests in udev-test.pl:
      
      LABEL, BUS="scsi", vendor="IBM-ESXS", NAME="1/2/a/b/node", SYMLINK="1/2/c/d/symlink"
      
        Dec  7 06:48:34 pim udev[13789]: create_node: symlink 'udev-root/1/2/c/d/symlink' to node '1/2/a/b/node' requested
        Dec  7 06:48:34 pim udev[13789]: create_path: created 'udev-root/1/2/c'
        Dec  7 06:48:34 pim udev[13789]: create_path: created 'udev-root/1/2/c/d'
        Dec  7 06:48:34 pim udev[13789]: create_node: symlink(../../a/b/node, udev-root/1/2/c/d/symlink)
      
      3d150dfb
    • patmans@us.ibm.com's avatar
      [PATCH] better allow builds of extras programs under udev · eadb1bbc
      patmans@us.ibm.com authored
      Here is an improved version of the patch that enables builds of the extras
      progams for the targets all, clean, install, and uninstall, and passes
      down the "prefix" for use by install and uninstall.
      
      This patch enables building of the "extras" programs using the same build
      environment as udev (i.e. build with udev's versions of klibc and
      sysfsutils).
      
      For example, build scsi_id and udev via:
      
      	make EXTRAS=extras/scsi_id
      
      Build scsi_id and udev with klibc via:
      
      	make KLIBC=true EXTRAS=extras/scsi_id
      
      eadb1bbc
    • patmans@us.ibm.com's avatar
      [PATCH] update udev extras/scsi_id to version 0.2 · 1bed1db4
      patmans@us.ibm.com authored
      This patch updates scsi_id under udev from version 0.1 to version 0.2.
      
      1bed1db4
    • christophe.varoqui@free.fr's avatar
      [PATCH] yet more extras/multipath · a652254d
      christophe.varoqui@free.fr authored
      * implement a reschedule flag in /var/run. Last thing the prog do before
      exit is check if a call to multipath was done (but canceled by
      /var/run/multipath.run check) during its execution. If so restart the
      main loop.
      * implement a blacklist of sysfs bdev to not bother with for now (hd,
      md, dm, sr, scd, ram, raw). This avoid sending SG_IO to unappropiate
      devices.
      
      Compiles & survive "while true;do (./multipath -v &);done"
      
      a652254d
    • christophe.varoqui@free.fr's avatar
      [PATCH] more extras/multipath updates · d8775157
      christophe.varoqui@free.fr authored
      * Adds a /var/run/multipath.run handling to avoid simultaneous runs.
      * Remove a commented-out "printf"
      
      d8775157
    • christophe.varoqui@free.fr's avatar
      [PATCH] extras/multipath update · 2bf80b67
      christophe.varoqui@free.fr authored
      here is the next update which brings this multipath to the state i'm not
      ashamed of it being in udev :)
      
      * drop a libdevmapper copy in extras/multipath; maybe discussions w/
      Sistina folks will bring a better solution in the future.
      * drop a putchar usage in libdevmapper to compile cleanly with klibc
      * drop another such usage of my own in main.c
      * massage the Makefile to compile libdevmapper against klibc
      * use "ld" to produce the binary rather than "gcc -static"
      * stop being stupid w/ uneeded major, minor & dev in main.c:dm_mk_node()
      * reverse to creating striped target for now because the multipath
      target is more hairy than expected initialy
      * push the version code to 009 to be in synch w/ udev
      
      builds & run here.
      binary size is 43ko, which is fairly gratifying after all the efforts
      I've put to compiling it with klibc :)
      
      2bf80b67
    • kay.sievers@vrfy.org's avatar
      [PATCH] man page beauty · 83fa40fc
      kay.sievers@vrfy.org authored
      I've never seen any project where the documentation is in sync with the
      code at this early stage. Nice! So here is the patch to make it extra perfect :)
      
        remove random indent to be consistent
        style is "shell style"
        s/wildcard/pattern/
        mention negation char in character class
      
      83fa40fc
    • kay.sievers@vrfy.org's avatar
      [PATCH] pattern match for label method · 83be97ba
      kay.sievers@vrfy.org authored
        switch LABEL search to pattern match
        add a test for pattern match in LABEL
        remove useless rule from udev.rules
      
      83be97ba
    • kay.sievers@vrfy.org's avatar
      [PATCH] a bug in linefeed removal · 28d6536a
      kay.sievers@vrfy.org authored
      While I was adding pattern match to the LABEL method i hit a bug.
      We modify a string returned from libsysfs, so with every iteration is is
      truncated by one char:
      
      Dec  4 02:27:16 pim udev[23307]: do_label: dev->bus='scsi' sysfs_device->bus='scsi'
      Dec  4 02:27:16 pim udev[23307]: do_label: look for device attribute 'vendor'
      Dec  4 02:27:16 pim udev[23307]: do_label: xxx 'IBM-ESXS '
      Dec  4 02:27:16 pim udev[23307]: do_label: compare attribute 'vendor' value 'IBM-ESX' with '?IBM-ESXS'
      Dec  4 02:27:16 pim udev[23307]: do_label: dev->bus='scsi' sysfs_device->bus='scsi'
      Dec  4 02:27:16 pim udev[23307]: do_label: look for device attribute 'vendor'
      Dec  4 02:27:16 pim udev[23307]: do_label: xxx 'IBM-ESX'
      Dec  4 02:27:16 pim udev[23307]: do_label: compare attribute 'vendor' value 'IBM-ES' with 'IBM-ESXS?'
      Dec  4 02:27:16 pim udev[23307]: do_label: dev->bus='scsi' sysfs_device->bus='scsi'
      Dec  4 02:27:16 pim udev[23307]: do_label: look for device attribute 'vendor'
      Dec  4 02:27:16 pim udev[23307]: do_label: xxx 'IBM-ES'
      Dec  4 02:27:16 pim udev[23307]: do_label: compare attribute 'vendor' value 'IBM-E' with 'IBM-ES??'
      Dec  4 02:27:16 pim udev[23307]: do_label: dev->bus='scsi' sysfs_device->bus='scsi'
      Dec  4 02:27:16 pim udev[23307]: do_label: look for device attribute 'vendor'
      Dec  4 02:27:16 pim udev[23307]: do_label: xxx 'IBM-E'
      Dec  4 02:27:16 pim udev[23307]: do_label: compare attribute 'vendor' value 'IBM-' with 'IBM-ESXSS'
      
      I changed the behavior to remove only the line feed.
      
      03-bug-in-linefeed-removal.diff
        remove only the line feed from string not every last char
      
      28d6536a
    • greg@kroah.com's avatar
      [PATCH] 008_bk mark · da146a3e
      greg@kroah.com authored
      da146a3e
    • greg@kroah.com's avatar
      [PATCH] v008 release · c9feb4d9
      greg@kroah.com authored
      c9feb4d9
    • greg@kroah.com's avatar
      [PATCH] update ChangeLog for v008 · 6ad5f7b4
      greg@kroah.com authored
      6ad5f7b4
    • greg@kroah.com's avatar
    • greg@kroah.com's avatar
      9c9fb5f6
    • greg@kroah.com's avatar
      [PATCH] Added Kay's name to the man page. · fc1f0d43
      greg@kroah.com authored
      fc1f0d43
    • greg@kroah.com's avatar
    • greg@kroah.com's avatar
      [PATCH] fix permission handling logic · 61219c75
      greg@kroah.com authored
      Now we can handle wildcards properly within the permission file.
      
      61219c75
    • greg@kroah.com's avatar
      206d3623
    • greg@kroah.com's avatar
    • greg@kroah.com's avatar
      356816ab
    • greg@kroah.com's avatar