From 7e5f7397f9dbbf2be421d639494576a5c8167241 Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Tue, 13 Jan 2004 18:31:18 -0800 Subject: [PATCH] [PATCH] udev - CALLOUT is PROGRAM now replace CALLOUT by PROGRAM and fix old rule format --- etc/udev/udev.rules | 2 +- etc/udev/udev.rules.devfs | 2 +- etc/udev/udev.rules.gentoo | 2 +- extras/ide-devfs.sh | 4 ++-- extras/name_cdrom.pl | 4 ++-- namedev.c | 4 ++-- namedev.h | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/etc/udev/udev.rules b/etc/udev/udev.rules index 6cb4896743..a2279976fe 100644 --- a/etc/udev/udev.rules +++ b/etc/udev/udev.rules @@ -6,7 +6,7 @@ # %M - the kernel major number for the device # %m - the kernel minor number for the device # %b - the bus id for the device -# %c - the return value for the CALLOUT program (note, this doesn't work within +# %c - the return value of the external PROGRAM (note, this doesn't work within # the PROGRAM field for the obvious reason.) # %D - use the devfs style disk name for this device. # For partitions, this will result in 'part%n' diff --git a/etc/udev/udev.rules.devfs b/etc/udev/udev.rules.devfs index 3c45db79cf..bc3f26c1cc 100644 --- a/etc/udev/udev.rules.devfs +++ b/etc/udev/udev.rules.devfs @@ -9,7 +9,7 @@ # %M - the kernel major number for the device # %m - the kernel minor number for the device # %b - the bus id for the device -# %c - the return value for the CALLOUT program (note, this doesn't work within +# %c - the return value of the external PROGRAM (note, this doesn't work within # the PROGRAM field for the obvious reason.) # %D - use the devfs style disk name for this device. # For partitions, this will result in 'part%n' diff --git a/etc/udev/udev.rules.gentoo b/etc/udev/udev.rules.gentoo index 4a3292853f..a449a4dac9 100644 --- a/etc/udev/udev.rules.gentoo +++ b/etc/udev/udev.rules.gentoo @@ -9,7 +9,7 @@ # %M - the kernel major number for the device # %m - the kernel minor number for the device # %b - the bus id for the device -# %c - the return value for the CALLOUT program (note, this doesn't work within +# %c - the return value of the external PROGRAM (note, this doesn't work within # the PROGRAM field for the obvious reason.) # %D - use the devfs style disk name for this device. # For partitions, this will result in 'part%n' diff --git a/extras/ide-devfs.sh b/extras/ide-devfs.sh index 57fb00b676..ab194b01e6 100644 --- a/extras/ide-devfs.sh +++ b/extras/ide-devfs.sh @@ -1,8 +1,8 @@ #!/bin/sh -# udev CALLOUT script +# udev external PROGRAM script # return devfs-names for ide-devices -# CALLOUT, BUS="ide", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", ID="hd*", NAME="%1c", SYMLINK="%2c %3c" +# BUS="ide", PROGRAM="/etc/udev/ide-devfs.sh %k %b %n", RESULT="hd*", NAME="%1c", SYMLINK="%2c %3c" HOST="${2%\.[0-9]}" TARGET="${2#[0-9]\.}" diff --git a/extras/name_cdrom.pl b/extras/name_cdrom.pl index 7a14e866a6..e522c9fda8 100644 --- a/extras/name_cdrom.pl +++ b/extras/name_cdrom.pl @@ -2,8 +2,8 @@ # a horribly funny script that shows how flexible udev can really be # This is to be executed by udev with the following rules: -# CALLOUT, BUS="ide", PROGRAM="name_cdrom.pl %M %m", ID="good*", NAME="%2c", SYMLINK="cdrom" -# CALLOUT, BUS="scsi", PROGRAM="name_cdrom.pl %M %m", ID="good*", NAME="%2c", SYMLINK="cdrom" +# BUS="ide", PROGRAM="name_cdrom.pl %M %m", PROGRAM="good*", NAME="%2c", SYMLINK="cdrom" +# BUS="scsi", PROGRAM="name_cdrom.pl %M %m", PROGRAM="good*", NAME="%2c", SYMLINK="cdrom" # # The scsi rule catches USB cdroms and ide-scsi devices. # diff --git a/namedev.c b/namedev.c index fdc6252bf6..6f7bfb6805 100644 --- a/namedev.c +++ b/namedev.c @@ -309,7 +309,7 @@ static int execute_program(char *path, char *value, int len) int value_set = 0; char buffer[256]; char *pos; - char *args[CALLOUT_MAXARG]; + char *args[PROGRAM_MAXARG]; int i; dbg("executing '%s'", path); @@ -331,7 +331,7 @@ static int execute_program(char *path, char *value, int len) if (strchr(path, ' ')) { /* exec with arguments */ pos = path; - for (i=0; i < CALLOUT_MAXARG-1; i++) { + for (i=0; i < PROGRAM_MAXARG-1; i++) { args[i] = strsep(&pos, " "); if (args[i] == NULL) break; diff --git a/namedev.h b/namedev.h index 4e75db6410..f5b63a8805 100644 --- a/namedev.h +++ b/namedev.h @@ -45,7 +45,7 @@ struct sysfs_class_device; #define FIELD_NAME "NAME" #define FIELD_SYMLINK "SYMLINK" -#define CALLOUT_MAXARG 10 +#define PROGRAM_MAXARG 10 #define MAX_SYSFS_PAIRS 5 struct sysfs_pair {