@@ -481,6 +481,9 @@ int VerifyInFstab(EvalContext *ctx, char *name, const Attributes *a, const Promi
481
481
}
482
482
483
483
#if defined(__QNX__ ) || defined(__QNXNTO__ )
484
+ // QNX documents 4 fstab fields : https://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.utilities/topic/f/fstab.html
485
+ // specialdevice mountpoint type mountoptions
486
+ // TODO Remove DUMP and PASS options used here (unsupported)?
484
487
NDEBUG_UNUSED int ret = snprintf (fstab , CF_BUFSIZE , "%s \t %s %s\t%s 0 0" , device , mountpt , fstype , opts );
485
488
assert (ret >= 0 && ret < CF_BUFSIZE );
486
489
#elif defined(_CRAY )
@@ -492,9 +495,13 @@ int VerifyInFstab(EvalContext *ctx, char *name, const Attributes *a, const Promi
492
495
assert (ret >= 0 && ret < CF_BUFSIZE );
493
496
break ;
494
497
#elif defined(__hpux )
498
+ // HP-UX documents 7 fstab fields: https://nixdoc.net/man-pages/HP-UX/man4/fstab.4.html
499
+ // deviceSpecialFile directory type options backupFrequency passNumber comment
500
+ // TODO Bring promise comment in as the 7th comment field # promise comment (stripped of newlines)
495
501
NDEBUG_UNUSED int ret = snprintf (fstab , CF_BUFSIZE , "%s %s \t %s \t %s 0 0" , device , mountpt , fstype , opts );
496
502
assert (ret >= 0 && ret < CF_BUFSIZE );
497
503
#elif defined(_AIX )
504
+ // AIX uses /etc/filesystems: https://www.ibm.com/docs/en/aix/7.2.0?topic=files-filesystems-file
498
505
NDEBUG_UNUSED int ret = snprintf (fstab , CF_BUFSIZE ,
499
506
"%s:\n\tdev\t= %s\n\ttype\t= %s\n\tvfs\t= %s\n\tnodename\t= %s\n\tmount\t= true\n\toptions\t= %s\n\taccount\t= false\n" ,
500
507
mountpt , rmountpt , fstype , fstype , host , opts );
@@ -503,12 +510,18 @@ int VerifyInFstab(EvalContext *ctx, char *name, const Attributes *a, const Promi
503
510
NDEBUG_UNUSED int ret = snprintf (fstab , CF_BUFSIZE , "%s \t %s \t %s \t %s" , device , mountpt , fstype , opts );
504
511
assert (ret >= 0 && ret < CF_BUFSIZE );
505
512
#elif defined(__NetBSD__ ) || defined(__OpenBSD__ ) || defined(__DragonFly__ ) || defined(__FreeBSD__ ) || defined(__APPLE__ )
513
+ // BSDs document 6 fstab fields https://man.freebsd.org/cgi/man.cgi?fstab(5)
514
+ // Device Mountpoint FStype Options Dump Pass
506
515
NDEBUG_UNUSED int ret = snprintf (fstab , CF_BUFSIZE , "%s \t %s \t %s \t %s 0 0" , device , mountpt , fstype , opts );
507
516
assert (ret >= 0 && ret < CF_BUFSIZE );
508
517
#elif defined(__sun ) || defined(sco ) || defined(__SCO_DS )
518
+ // SunOS uses /etc/fstab and documents 7 fields: https://docs.oracle.com/cd/E19455-01/805-6331/fsadm-59727/index.html
519
+ // deviceToMount deviceToFsck mountPoint FStype fsckPass automount? mountOptions
520
+ // - is used for deviceToFsck for read-only and network based file systems
509
521
NDEBUG_UNUSED int ret = snprintf (fstab , CF_BUFSIZE , "%s - %s %s - yes %s" , device , mountpt , fstype , opts );
510
522
assert (ret >= 0 && ret < CF_BUFSIZE );
511
523
#elif defined(__CYGWIN__ )
524
+ // https://cygwin.com/cygwin-ug-net/using.html#mount-table
512
525
NDEBUG_UNUSED int ret = snprintf (fstab , CF_BUFSIZE , "/bin/mount %s %s" , device , mountpt );
513
526
assert (ret >= 0 && ret < CF_BUFSIZE );
514
527
#else
0 commit comments