summaryrefslogtreecommitdiff
path: root/packages/gnuplot/qtplot_0.2.bb
diff options
context:
space:
mode:
authorPhilipp Zabel <philipp.zabel@gmail.com>2006-10-01 11:10:44 +0000
committerPhilipp Zabel <philipp.zabel@gmail.com>2006-10-01 11:10:44 +0000
commit7d6e29274208a55482338a8165576455e7253092 (patch)
tree2020fec55dc04e38de4e90afb8955daa6f839d4a /packages/gnuplot/qtplot_0.2.bb
parentabbd9edd5dd4928b511aa3d95059c2380d6f5064 (diff)
strace-4.5.14: drop CTL_PROC, was removed from kernel headers
atch_fs(const char *option, const char *type) +{ + const int len = strlen(type); + const int no = option[0] == 'n' && option[1] == 'o'; + const char *optp = option; + + if (len > 0) do { + const char *match = strstr(optp, type); + + if (match == NULL) { + /* No match, but if the option string starts 'no' no match + * means yes. + */ + return no; + } + + /* Match, may be partial, check for end-of-type in option string. */ + if (match[len] == 0 || match[len] == ',') { + /* Ok, check for type or notype. */ + if (match == option) { + /* Exact match at start (can't be 'no') */ + return 1; + } + if (match > option+1) { + if (match[-1] == ',') { + /* Exact match in middle, might be 'no' */ + return !no; + } + if (match == option+2 && no) { + /* Exact match to 'notype' at start. */ + return 0; + } + if (match > option+2 && match[-3] == ',' && + match[-2] == 'n' && match[-1] == 'o') { + return 0; + } + } + } + + /* Look for another match. */ + optp = match+1; + } while (1); + + /* zero length type in fstab (impossible?), don't match it. */ + return 0; +} + extern int mount_main(int argc, char **argv) { struct stat statbuf; @@ -371,6 +421,7 @@ char *extra_opts; int flags = 0; char *filesystemType = "auto"; + char *filesystemOption = 0; int got_filesystemType = 0; char *device = xmalloc(PATH_MAX); char *directory = xmalloc(PATH_MAX); @@ -393,6 +444,7 @@ break; case 't': filesystemType = optarg; + filesystemOption = optarg; got_filesystemType = 1; break; case 'w': @@ -460,6 +512,8 @@ strcpy(device, m->mnt_fsname); strcpy(directory, m->mnt_dir); + if (all && filesystemOption != 0 && !match_fs(filesystemOption, m->mnt_type)) + continue; filesystemType = bb_xstrdup(m->mnt_type); singlemount: extra_opts = string_flags;