search for: mnt_passno

Displaying 3 results from an estimated 3 matches for "mnt_passno".

2008 Sep 07
1
[git pull v2] initial mntent.h, mount features, ipconfig fixes
[ gsi.de pretends this is massmailing so removed from CC's ] hello hpa, please review and on ack merge belows patchset. changes from v1, thanks to review by kzak: * add strtok_r() * use it in getmntent_r() * getment_r() parses mnt_freq and mnt_passno too isn't that hard. thanks maks git pull git://git.debian.org/~maks/klibc.git maks for the changes: maximilian attems (9): [klibc] add strtok_r() [klibc] Add initial mntent.h with setmntent() and endmntent() [klibc] add getmntent() [klibc] mount: add help arg for u...
2008 Jul 23
2
[RFC] klibc add minimal mntent.h
...+struct mntent +{ + char *mnt_fsname; /* Device or server for filesystem. */ + char *mnt_dir; /* Directory mounted on. */ + char *mnt_type; /* Type of filesystem: ufs, nfs, etc. */ + char *mnt_opts; /* Comma-separated options for fs. */ + int mnt_freq; /* Dump frequency (in days). */ + int mnt_passno; /* Pass number for `fsck'. */ +}; + +#endif /* mntent.h */
2008 Sep 05
0
initial mntent.h, mount features, ipconfig fixes
...e) + return NULL; + + mntbuf->mnt_type = strtok(NULL, sep); + if (!mntbuf->mnt_type) + return NULL; + + mntbuf->mnt_opts = strtok(NULL, sep); + if (!mntbuf->mnt_opts) + mntbuf->mnt_opts = ""; + + mntbuf->mnt_freq = 0; + + /* FIXME: might be interesting */ + mntbuf->mnt_passno = 1; + + return mntbuf; +} + +struct mntent *getmntent(FILE *fp) +{ + static char *buf = NULL; + static struct mntent mntbuf; + + buf = malloc(BUFLEN); + if (!buf) + perror("malloc"); + + return getmntent_r(fp, &mntbuf, buf, BUFLEN); +} commit 3c78cb98b2634db5abb9e9cc743efbf893c37c3...