Skip to content
Snippets Groups Projects
Commit ef407547 authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

better implementation

parent 06b8ffd9
No related branches found
No related tags found
No related merge requests found
...@@ -61,6 +61,7 @@ int main (int argc, char const *const *argv) ...@@ -61,6 +61,7 @@ int main (int argc, char const *const *argv)
errno = 0 ; errno = 0 ;
p = getmntent(fp) ; p = getmntent(fp) ;
if (!p) break ; if (!p) break ;
if (!strcmp(p->mnt_dir,tmpdir)) continue ;
for (; i < EXCLUDEN ; i++) for (; i < EXCLUDEN ; i++)
{ {
if (!strcmp(p->mnt_type, exclude_type[i])) if (!strcmp(p->mnt_type, exclude_type[i]))
...@@ -69,8 +70,7 @@ int main (int argc, char const *const *argv) ...@@ -69,8 +70,7 @@ int main (int argc, char const *const *argv)
break ; break ;
} }
} }
if ((i < EXCLUDEN && got[i] == 1) || !strcmp(p->mnt_dir,tmpdir)) if (i < EXCLUDEN && got[i] == 1) continue ;
continue ;
if (line >= MAXLINES) if (line >= MAXLINES)
log_die(100, "too many mount points") ; log_die(100, "too many mount points") ;
mountpoints[line++] = sa.len ; mountpoints[line++] = sa.len ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment