mirror of
https://github.com/troglobit/finit.git
synced 2026-10-08 16:34:45 +07:00
getfsent(): Read only six fields per line
The fs.fs_type is only for *BSD, we hard-code it to "rw" in the meantime. Should be safe in most cases. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -274,12 +274,15 @@ struct fstab *getfsent(void)
|
||||
static struct fstab fs;
|
||||
|
||||
fs.fs_spec = lftok(fstab);
|
||||
if (fs.fs_spec == NULL)
|
||||
return NULL;
|
||||
|
||||
fs.fs_file = lftok(fstab);
|
||||
fs.fs_vfstype = lftok(fstab);
|
||||
fs.fs_mntops = lftok(fstab);
|
||||
fs.fs_type = (const char *)lftok(fstab);
|
||||
fs.fs_freq = atoi(lftok(fstab) ?: 0);
|
||||
fs.fs_passno = atoi(lftok(fstab) ?: 0);
|
||||
fs.fs_type = "rw";
|
||||
fs.fs_freq = atoi(lftok(fstab) ?: "0");
|
||||
fs.fs_passno = atoi(lftok(fstab) ?: "0");
|
||||
|
||||
return &fs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user