diff options
Diffstat (limited to 'util-linux/mdev.c')
| -rw-r--r-- | util-linux/mdev.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/util-linux/mdev.c b/util-linux/mdev.c index b4042c07e..cd6c1a89d 100644 --- a/util-linux/mdev.c +++ b/util-linux/mdev.c | |||
| @@ -132,6 +132,7 @@ static void make_device(char *path, int delete) | |||
| 132 | major = -1; | 132 | major = -1; |
| 133 | } | 133 | } |
| 134 | } | 134 | } |
| 135 | /* else: for delete, -1 still deletes the node, but < -1 suppresses that */ | ||
| 135 | 136 | ||
| 136 | /* Determine device name, type, major and minor */ | 137 | /* Determine device name, type, major and minor */ |
| 137 | device_name = (char*) bb_basename(path); | 138 | device_name = (char*) bb_basename(path); |
| @@ -279,7 +280,7 @@ static void make_device(char *path, int delete) | |||
| 279 | if (aliaslink == '!' && s == a+1) { | 280 | if (aliaslink == '!' && s == a+1) { |
| 280 | val = st; | 281 | val = st; |
| 281 | /* "!": suppress node creation/deletion */ | 282 | /* "!": suppress node creation/deletion */ |
| 282 | major = -1; | 283 | major = -2; |
| 283 | } | 284 | } |
| 284 | else if (aliaslink == '>' || aliaslink == '=') { | 285 | else if (aliaslink == '>' || aliaslink == '=') { |
| 285 | val = st; | 286 | val = st; |
| @@ -379,7 +380,7 @@ static void make_device(char *path, int delete) | |||
| 379 | free(command); | 380 | free(command); |
| 380 | } | 381 | } |
| 381 | 382 | ||
| 382 | if (delete && major >= 0) { | 383 | if (delete && major >= -1) { |
| 383 | if (ENABLE_FEATURE_MDEV_RENAME && alias) { | 384 | if (ENABLE_FEATURE_MDEV_RENAME && alias) { |
| 384 | if (aliaslink == '>') | 385 | if (aliaslink == '>') |
| 385 | unlink(device_name); | 386 | unlink(device_name); |
