#ifndef lint
static const char rcsid[] =
- "$Id: optr.c,v 1.36 2003/03/30 15:40:36 stelian Exp $";
+ "$Id: optr.c,v 1.39 2004/07/05 15:12:45 stelian Exp $";
#endif /* not lint */
#include <config.h>
/* Translade UUID=, LABEL= ... */
disk = get_device_name(fs->mnt_fsname);
if (disk == NULL)
- quit("Cannot find a disk having %s\n", fs->mnt_fsname);
+ disk = strdup(fs->mnt_fsname);
/* Discard non block devices */
if (stat(disk, &buf) != 0 || !S_ISBLK(buf.st_mode)) {
quit("Cannot access %s\n", tabfs->mnt_fsname);
if (tabbuf.st_rdev == buf.st_rdev) {
free(new);
+ /* Copy passno and freq from /etc/fstab because
+ * /etc/mtab does always have them as 0 0 */
+ if (!tabfs->mnt_passno)
+ tabfs->mnt_passno = fs->mnt_passno;
+ if (!tabfs->mnt_freq)
+ tabfs->mnt_freq = fs->mnt_freq;
return NULL;
}
}
date = (char *)ctime(&ddate);
d = strchr(date, '\n');
if (d) *d = '\0';
- printf("Level %c, Date %s\n", level, date);
+ printf("Level %d, Date %s\n", level, date);
} else
printf("never\n");
}