Skip to content
Snippets Groups Projects
Select Git revision
  • e105b8bfc769b0545b6f0f395179d1e43cbee822
  • master default protected
  • android-msm-bullhead-3.10-nougat_kgdb_less_changes
  • android-msm-bullhead-3.10-nougat_kgdb
  • android-msm-bullhead-3.10-nougat_klist
  • android-4.4
  • android-msm-vega-4.4-oreo-daydream
  • android-msm-wahoo-4.4-p-preview-5
  • android-msm-wahoo-4.4-pie
  • android-msm-marlin-3.18-p-preview-5
  • android-msm-marlin-3.18-pie
  • android-msm-wahoo-2018.07-oreo-m2
  • android-msm-wahoo-2018.07-oreo-m4
  • android-msm-wahoo-4.4-p-preview-4
  • android-msm-bullhead-3.10-oreo-m6
  • android-msm-angler-3.10-oreo-m6
  • android-msm-marlin-3.18-p-preview-4
  • android-msm-stargazer-3.18-oreo-wear-dr
  • android-msm-catshark-3.18-oreo-wear-dr
  • android-msm-wahoo-4.4-oreo-m2
  • android-msm-wahoo-4.4-oreo-m4
  • android-daydreamos-8.0.0_r0.5
  • android-8.1.0_r0.92
  • android-8.1.0_r0.91
  • android-daydreamos-8.0.0_r0.4
  • android-p-preview-5_r0.2
  • android-p-preview-5_r0.1
  • android-9.0.0_r0.5
  • android-9.0.0_r0.4
  • android-9.0.0_r0.2
  • android-9.0.0_r0.1
  • android-8.1.0_r0.81
  • android-8.1.0_r0.80
  • android-8.1.0_r0.78
  • android-8.1.0_r0.76
  • android-8.1.0_r0.75
  • android-8.1.0_r0.72
  • android-8.1.0_r0.70
  • android-p-preview-4_r0.2
  • android-p-preview-4_r0.1
  • android-wear-8.0.0_r0.30
41 results

class.c

Blame
  • user avatar
    Dan Williams authored and Greg Kroah-Hartman committed
    Why?:
    There are occasions where userspace would like to access sysfs
    attributes for a device but it may not know how sysfs has named the
    device or the path.  For example what is the sysfs path for
    /dev/disk/by-id/ata-ST3160827AS_5MT004CK?  With this change a call to
    stat(2) returns the major:minor then userspace can see that
    /sys/dev/block/8:32 links to /sys/block/sdc.
    
    What are the alternatives?:
    1/ Add an ioctl to return the path: Doable, but sysfs is meant to reduce
       the need to proliferate ioctl interfaces into the kernel, so this
       seems counter productive.
    
    2/ Use udev to create these symlinks: Also doable, but it adds a
       udev dependency to utilities that might be running in a limited
       environment like an initramfs.
    
    3/ Do a full-tree search of sysfs.
    
    [kay.sievers@vrfy.org: fix duplicate registrations]
    [kay.sievers@vrfy.org: cleanup suggestions]
    
    Cc: Neil Brown <neilb@suse.de>
    Cc: Tejun Heo <htejun@gmail.com>
    Acked-by: default avatarKay Sievers <kay.sievers@vrfy.org>
    Reviewed-by: default avatarSL Baur <steve@xemacs.org>
    Acked-by: default avatarKay Sievers <kay.sievers@vrfy.org>
    Acked-by: default avatarMark Lord <lkml@rtr.ca>
    Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
    Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    e105b8bf
    History
    class.c 9.12 KiB