Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 91011 Details for
Bug 119989
Allow configuration of udev coldplug functionality
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
udevtrigger-skip.patch
udevtrigger-skip.patch (text/plain), 2.13 KB, created by
TGL
on 2006-07-05 13:55:55 UTC
(
hide
)
Description:
udevtrigger-skip.patch
Filename:
MIME Type:
Creator:
TGL
Created:
2006-07-05 13:55:55 UTC
Size:
2.13 KB
patch
obsolete
>diff --git a/udevtrigger.c b/udevtrigger.c >index 2d5772f..837524d 100644 >--- a/udevtrigger.c >+++ b/udevtrigger.c >@@ -70,12 +70,26 @@ static char *first_list[] = { > LIST_HEAD(device_first_list); > LIST_HEAD(device_default_list); > LIST_HEAD(device_last_list); >+LIST_HEAD(path_skip_list); > > static int device_list_insert(const char *path) > { > struct list_head *device_list = &device_default_list; > const char *devpath = &path[strlen(sysfs_path)]; > int i; >+ struct name_entry *loop_path; >+ int devpath_length = strlen(devpath); >+ >+ list_for_each_entry(loop_path, &path_skip_list, node) { >+ int skip_arg_length = strlen(loop_path->name); >+ if (devpath_length >= skip_arg_length >+ && strncmp(devpath, loop_path->name, skip_arg_length) == 0 >+ && (*(devpath+skip_arg_length) == '\0' >+ || *(devpath+skip_arg_length) == '/')) { >+ dbg("skip '%s'" , path); >+ return 0; >+ } >+ } > > for (i = 0; first_list[i] != NULL; i++) { > if (strncmp(devpath, first_list[i], strlen(first_list[i])) == 0) { >@@ -321,6 +335,7 @@ static void udev_scan_class(void) > int main(int argc, char *argv[], char *envp[]) > { > int i; >+ char* skip_param; > > logging_init("udevtrigger"); > udev_config_init(); >@@ -335,8 +350,23 @@ int main(int argc, char *argv[], char *e > verbose = 1; > else if (strcmp(arg, "--dry-run") == 0 || strcmp(arg, "-n") == 0) > dry_run = 1; >- else { >- fprintf(stderr, "Usage: udevtrigger [--verbose] [--dry-run]\n"); >+ else if ((strncmp(arg, "--skip=", 7) == 0 && (skip_param = strdup(arg+7))) >+ || (strcmp(arg, "-s") == 0 && (++i < argc) && (skip_param = strdup(argv[i])))) { >+ while(strlen(skip_param)) { >+ char* comma = strchr(skip_param,','); >+ int skip_param_length; >+ if (comma != NULL) >+ *comma = '\0'; >+ if (!(skip_param_length = strlen(skip_param))) >+ continue; >+ dbg("%s will be ignored",skip_param); >+ if (*(skip_param+skip_param_length-1) == '/') >+ *(skip_param+skip_param_length-1) = '\0'; >+ name_list_add(&path_skip_list, skip_param, 0); >+ skip_param += skip_param_length+1; >+ } >+ } else { >+ fprintf(stderr, "Usage: udevtrigger [--verbose] [--dry-run] [--skip=/some/path[,...]]\n"); > goto exit; > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 119989
:
90942
|
90943
| 91011 |
91028