diff options
Diffstat (limited to 'miscutils/devfsd.c')
-rw-r--r-- | miscutils/devfsd.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index 6493fe4f1..24c953bac 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
@@ -219,7 +219,7 @@ static void action_execute(const struct devfsd_notify_struct *, const struct con | |||
219 | const regmatch_t *, unsigned); | 219 | const regmatch_t *, unsigned); |
220 | static void action_modload(const struct devfsd_notify_struct *info, const struct config_entry_struct *entry); | 220 | static void action_modload(const struct devfsd_notify_struct *info, const struct config_entry_struct *entry); |
221 | static void action_copy(const struct devfsd_notify_struct *, const struct config_entry_struct *, | 221 | static void action_copy(const struct devfsd_notify_struct *, const struct config_entry_struct *, |
222 | const regmatch_t *, unsigned); | 222 | const regmatch_t *, unsigned); |
223 | static void action_compat(const struct devfsd_notify_struct *, unsigned); | 223 | static void action_compat(const struct devfsd_notify_struct *, unsigned); |
224 | static void free_config(void); | 224 | static void free_config(void); |
225 | static void restore(char *spath, struct stat source_stat, int rootlen); | 225 | static void restore(char *spath, struct stat source_stat, int rootlen); |
@@ -229,12 +229,12 @@ static void signal_handler(int); | |||
229 | static const char *get_variable(const char *, void *); | 229 | static const char *get_variable(const char *, void *); |
230 | static int make_dir_tree(const char *); | 230 | static int make_dir_tree(const char *); |
231 | static int expand_expression(char *, unsigned, const char *, const char *(*)(const char *, void *), void *, | 231 | static int expand_expression(char *, unsigned, const char *, const char *(*)(const char *, void *), void *, |
232 | const char *, const regmatch_t *, unsigned); | 232 | const char *, const regmatch_t *, unsigned); |
233 | static void expand_regexp(char *, size_t, const char *, const char *, const regmatch_t *, unsigned); | 233 | static void expand_regexp(char *, size_t, const char *, const char *, const regmatch_t *, unsigned); |
234 | static const char *expand_variable( char *, unsigned, unsigned *, const char *, | 234 | static const char *expand_variable( char *, unsigned, unsigned *, const char *, |
235 | const char *(*)(const char *, void *), void *); | 235 | const char *(*)(const char *, void *), void *); |
236 | static const char *get_variable_v2(const char *, const char *(*)(const char *, void *), void *); | 236 | static const char *get_variable_v2(const char *, const char *(*)(const char *, void *), void *); |
237 | static char get_old_ide_name(unsigned , unsigned); | 237 | static char get_old_ide_name(unsigned, unsigned); |
238 | static char *write_old_sd_name(char *, unsigned, unsigned, const char *); | 238 | static char *write_old_sd_name(char *, unsigned, unsigned, const char *); |
239 | 239 | ||
240 | /* busybox functions */ | 240 | /* busybox functions */ |
@@ -580,9 +580,9 @@ static void process_config_line(const char *line, unsigned long *event_mask) | |||
580 | /*This action will pass "/dev/$devname"(i.e. "/dev/" prefixed to | 580 | /*This action will pass "/dev/$devname"(i.e. "/dev/" prefixed to |
581 | the device name) to the module loading facility. In addition, | 581 | the device name) to the module loading facility. In addition, |
582 | the /etc/modules.devfs configuration file is used.*/ | 582 | the /etc/modules.devfs configuration file is used.*/ |
583 | if (ENABLE_DEVFSD_MODLOAD) | 583 | if (ENABLE_DEVFSD_MODLOAD) |
584 | new->action.what = AC_MODLOAD; | 584 | new->action.what = AC_MODLOAD; |
585 | break; | 585 | break; |
586 | case 6: /* EXECUTE */ | 586 | case 6: /* EXECUTE */ |
587 | new->action.what = AC_EXECUTE; | 587 | new->action.what = AC_EXECUTE; |
588 | num_args -= 3; | 588 | num_args -= 3; |
@@ -750,7 +750,7 @@ static void action_permissions(const struct devfsd_notify_struct *info, | |||
750 | } /* End Function action_permissions */ | 750 | } /* End Function action_permissions */ |
751 | 751 | ||
752 | static void action_modload(const struct devfsd_notify_struct *info, | 752 | static void action_modload(const struct devfsd_notify_struct *info, |
753 | const struct config_entry_struct *entry UNUSED_PARAM) | 753 | const struct config_entry_struct *entry UNUSED_PARAM) |
754 | /* [SUMMARY] Load a module. | 754 | /* [SUMMARY] Load a module. |
755 | <info> The devfs change. | 755 | <info> The devfs change. |
756 | <entry> The config file entry. | 756 | <entry> The config file entry. |
@@ -771,8 +771,8 @@ static void action_modload(const struct devfsd_notify_struct *info, | |||
771 | } /* End Function action_modload */ | 771 | } /* End Function action_modload */ |
772 | 772 | ||
773 | static void action_execute(const struct devfsd_notify_struct *info, | 773 | static void action_execute(const struct devfsd_notify_struct *info, |
774 | const struct config_entry_struct *entry, | 774 | const struct config_entry_struct *entry, |
775 | const regmatch_t *regexpr, unsigned int numexpr) | 775 | const regmatch_t *regexpr, unsigned int numexpr) |
776 | /* [SUMMARY] Execute a programme. | 776 | /* [SUMMARY] Execute a programme. |
777 | <info> The devfs change. | 777 | <info> The devfs change. |
778 | <entry> The config file entry. | 778 | <entry> The config file entry. |
@@ -803,8 +803,8 @@ static void action_execute(const struct devfsd_notify_struct *info, | |||
803 | 803 | ||
804 | 804 | ||
805 | static void action_copy(const struct devfsd_notify_struct *info, | 805 | static void action_copy(const struct devfsd_notify_struct *info, |
806 | const struct config_entry_struct *entry, | 806 | const struct config_entry_struct *entry, |
807 | const regmatch_t *regexpr, unsigned int numexpr) | 807 | const regmatch_t *regexpr, unsigned int numexpr) |
808 | /* [SUMMARY] Copy permissions. | 808 | /* [SUMMARY] Copy permissions. |
809 | <info> The devfs change. | 809 | <info> The devfs change. |
810 | <entry> The config file entry. | 810 | <entry> The config file entry. |
@@ -1259,11 +1259,11 @@ static int make_dir_tree(const char *path) | |||
1259 | } /* End Function make_dir_tree */ | 1259 | } /* End Function make_dir_tree */ |
1260 | 1260 | ||
1261 | static int expand_expression(char *output, unsigned int outsize, | 1261 | static int expand_expression(char *output, unsigned int outsize, |
1262 | const char *input, | 1262 | const char *input, |
1263 | const char *(*get_variable_func)(const char *variable, void *info), | 1263 | const char *(*get_variable_func)(const char *variable, void *info), |
1264 | void *info, | 1264 | void *info, |
1265 | const char *devname, | 1265 | const char *devname, |
1266 | const regmatch_t *ex, unsigned int numexp) | 1266 | const regmatch_t *ex, unsigned int numexp) |
1267 | /* [SUMMARY] Expand environment variables and regular subexpressions in string. | 1267 | /* [SUMMARY] Expand environment variables and regular subexpressions in string. |
1268 | <output> The output expanded expression is written here. | 1268 | <output> The output expanded expression is written here. |
1269 | <length> The size of the output buffer. | 1269 | <length> The size of the output buffer. |
@@ -1288,8 +1288,8 @@ static int expand_expression(char *output, unsigned int outsize, | |||
1288 | } /* End Function expand_expression */ | 1288 | } /* End Function expand_expression */ |
1289 | 1289 | ||
1290 | static void expand_regexp(char *output, size_t outsize, const char *input, | 1290 | static void expand_regexp(char *output, size_t outsize, const char *input, |
1291 | const char *devname, | 1291 | const char *devname, |
1292 | const regmatch_t *ex, unsigned int numex) | 1292 | const regmatch_t *ex, unsigned int numex) |
1293 | /* [SUMMARY] Expand all occurrences of the regular subexpressions \0 to \9. | 1293 | /* [SUMMARY] Expand all occurrences of the regular subexpressions \0 to \9. |
1294 | <output> The output expanded expression is written here. | 1294 | <output> The output expanded expression is written here. |
1295 | <outsize> The size of the output buffer. | 1295 | <outsize> The size of the output buffer. |
@@ -1385,7 +1385,7 @@ static struct translate_struct translate_table[] = | |||
1385 | }; | 1385 | }; |
1386 | 1386 | ||
1387 | const char *get_old_name(const char *devname, unsigned int namelen, | 1387 | const char *get_old_name(const char *devname, unsigned int namelen, |
1388 | char *buffer, unsigned int major, unsigned int minor) | 1388 | char *buffer, unsigned int major, unsigned int minor) |
1389 | /* [SUMMARY] Translate a kernel-supplied name into an old name. | 1389 | /* [SUMMARY] Translate a kernel-supplied name into an old name. |
1390 | <devname> The device name provided by the kernel. | 1390 | <devname> The device name provided by the kernel. |
1391 | <namelen> The length of the name. | 1391 | <namelen> The length of the name. |
@@ -1423,7 +1423,7 @@ const char *get_old_name(const char *devname, unsigned int namelen, | |||
1423 | }; | 1423 | }; |
1424 | 1424 | ||
1425 | for (trans = translate_table; trans->match != NULL; ++trans) { | 1425 | for (trans = translate_table; trans->match != NULL; ++trans) { |
1426 | len = strlen(trans->match); | 1426 | len = strlen(trans->match); |
1427 | 1427 | ||
1428 | if (strncmp(devname, trans->match, len) == 0) { | 1428 | if (strncmp(devname, trans->match, len) == 0) { |
1429 | if (trans->format == NULL) | 1429 | if (trans->format == NULL) |
@@ -1549,9 +1549,9 @@ static char *write_old_sd_name(char *buffer, | |||
1549 | /*EXPERIMENTAL_FUNCTION*/ | 1549 | /*EXPERIMENTAL_FUNCTION*/ |
1550 | 1550 | ||
1551 | int st_expr_expand(char *output, unsigned int length, const char *input, | 1551 | int st_expr_expand(char *output, unsigned int length, const char *input, |
1552 | const char *(*get_variable_func)(const char *variable, | 1552 | const char *(*get_variable_func)(const char *variable, |
1553 | void *info), | 1553 | void *info), |
1554 | void *info) | 1554 | void *info) |
1555 | /* [SUMMARY] Expand an expression using Borne Shell-like unquoted rules. | 1555 | /* [SUMMARY] Expand an expression using Borne Shell-like unquoted rules. |
1556 | <output> The output expanded expression is written here. | 1556 | <output> The output expanded expression is written here. |
1557 | <length> The size of the output buffer. | 1557 | <length> The size of the output buffer. |
@@ -1641,10 +1641,10 @@ st_expr_expand_out: | |||
1641 | /* Private functions follow */ | 1641 | /* Private functions follow */ |
1642 | 1642 | ||
1643 | static const char *expand_variable(char *buffer, unsigned int length, | 1643 | static const char *expand_variable(char *buffer, unsigned int length, |
1644 | unsigned int *out_pos, const char *input, | 1644 | unsigned int *out_pos, const char *input, |
1645 | const char *(*func)(const char *variable, | 1645 | const char *(*func)(const char *variable, |
1646 | void *info), | 1646 | void *info), |
1647 | void *info) | 1647 | void *info) |
1648 | /* [SUMMARY] Expand a variable. | 1648 | /* [SUMMARY] Expand a variable. |
1649 | <buffer> The buffer to write to. | 1649 | <buffer> The buffer to write to. |
1650 | <length> The length of the output buffer. | 1650 | <length> The length of the output buffer. |
@@ -1786,8 +1786,8 @@ expand_variable_out: | |||
1786 | 1786 | ||
1787 | 1787 | ||
1788 | static const char *get_variable_v2(const char *variable, | 1788 | static const char *get_variable_v2(const char *variable, |
1789 | const char *(*func)(const char *variable, void *info), | 1789 | const char *(*func)(const char *variable, void *info), |
1790 | void *info) | 1790 | void *info) |
1791 | /* [SUMMARY] Get a variable from the environment or . | 1791 | /* [SUMMARY] Get a variable from the environment or . |
1792 | <variable> The variable name. | 1792 | <variable> The variable name. |
1793 | <func> A function which will be used to get the variable. If this returns | 1793 | <func> A function which will be used to get the variable. If this returns |