X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=lib%2Flibspl%2Fgetmntany.c;h=d78357af5423fcad5d41387e30b8de576d82afea;hb=d1d7e2689db9e03f11c069ebc9f1ba12829e5dac;hp=f0b1cda4b5a85c1bb2a7068edc5269aab503b6d9;hpb=8ffef572ed2ba97e0c2d6a8aa2240012e611dc6f;p=mirror_zfs.git diff --git a/lib/libspl/getmntany.c b/lib/libspl/getmntany.c index f0b1cda4b..d78357af5 100644 --- a/lib/libspl/getmntany.c +++ b/lib/libspl/getmntany.c @@ -37,23 +37,25 @@ #include #include -#define BUFSIZE (MNT_LINE_MAX + 2) +#define BUFSIZE (MNT_LINE_MAX + 2) __thread char buf[BUFSIZE]; -#define DIFF(xx) ((mrefp->xx != NULL) && \ - (mgetp->xx == NULL || strcmp(mrefp->xx, mgetp->xx) != 0)) +#define DIFF(xx) ( \ + (mrefp->xx != NULL) && \ + (mgetp->xx == NULL || strcmp(mrefp->xx, mgetp->xx) != 0)) int getmntany(FILE *fp, struct mnttab *mgetp, struct mnttab *mrefp) { int ret; - while (((ret = _sol_getmntent(fp, mgetp)) == 0) && - (DIFF(mnt_special) || DIFF(mnt_mountp) || - DIFF(mnt_fstype) || DIFF(mnt_mntopts))); + while ( + ((ret = _sol_getmntent(fp, mgetp)) == 0) && ( + DIFF(mnt_special) || DIFF(mnt_mountp) || + DIFF(mnt_fstype) || DIFF(mnt_mntopts))); - return ret; + return (ret); } int @@ -69,13 +71,13 @@ _sol_getmntent(FILE *fp, struct mnttab *mgetp) mgetp->mnt_mountp = mntbuf.mnt_dir; mgetp->mnt_fstype = mntbuf.mnt_type; mgetp->mnt_mntopts = mntbuf.mnt_opts; - return 0; + return (0); } if (feof(fp)) - return -1; + return (-1); - return MNT_TOOLONG; + return (MNT_TOOLONG); } int @@ -89,11 +91,11 @@ getextmntent(FILE *fp, struct extmnttab *mp, int len) if (stat64(mp->mnt_mountp, &st) != 0) { mp->mnt_major = 0; mp->mnt_minor = 0; - return ret; + return (ret); } mp->mnt_major = major(st.st_dev); mp->mnt_minor = minor(st.st_dev); } - return ret; + return (ret); }