From 78306ef6e97b538549ad4d24983e02a52d49530b Mon Sep 17 00:00:00 2001 From: Christos Zoulas Date: Fri, 2 Jan 2009 15:59:10 +0000 Subject: [PATCH] enable more options for cd9660 filesystems (from NetBSD) --- ChangeLog | 4 ++++ amd/ops_cdfs.c | 17 +++++++++++++++++ configure.in | 5 ++++- doc/am-utils.texi | 14 ++++++++++++++ include/am_compat.h | 14 ++++++++++++++ 5 files changed, 53 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 15317a9..b1d9adc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-01-02 Christos Zoulas + + * add nocasetrans, nojoliet, rrcaseins for cd9660 filesystems + 2008-12-03 Christos Zoulas * allow ldap queries try a comma-separated list of servers given as: diff --git a/amd/ops_cdfs.c b/amd/ops_cdfs.c index c3df8b1..8fbae24 100644 --- a/amd/ops_cdfs.c +++ b/amd/ops_cdfs.c @@ -148,6 +148,7 @@ mount_cdfs(char *mntdir, char *fs_name, char *opts, int on_autofs) if (amu_hasmntopt(&mnt, MNTTAB_OPT_RRIP)) cdfs_flags |= MNT2_CDFS_OPT_RRIP; #endif /* defined(MNT2_CDFS_OPT_RRIP) && defined(MNTTAB_OPT_RRIP) */ + #if defined(MNT2_CDFS_OPT_NORRIP) && defined(MNTTAB_OPT_NORRIP) if (amu_hasmntopt(&mnt, MNTTAB_OPT_NORRIP)) cdfs_flags |= MNT2_CDFS_OPT_NORRIP; @@ -157,11 +158,27 @@ mount_cdfs(char *mntdir, char *fs_name, char *opts, int on_autofs) if (amu_hasmntopt(&mnt, MNTTAB_OPT_GENS)) cdfs_flags |= MNT2_CDFS_OPT_GENS; #endif /* defined(MNT2_CDFS_OPT_GENS) && defined(MNTTAB_OPT_GENS) */ + #if defined(MNT2_CDFS_OPT_EXTATT) && defined(MNTTAB_OPT_EXTATT) if (amu_hasmntopt(&mnt, MNTTAB_OPT_EXTATT)) cdfs_flags |= MNT2_CDFS_OPT_EXTATT; #endif /* defined(MNT2_CDFS_OPT_EXTATT) && defined(MNTTAB_OPT_EXTATT) */ +#if defined(MNT2_CDFS_OPT_NOCASETRANS) && defined(MNTTAB_OPT_NOCASETRANS) + if (amu_hasmntopt(&mnt, MNTTAB_OPT_NOCASETRANS)) + cdfs_flags |= MNT2_CDFS_OPT_NOCASETRANS; +#endif /* defined(MNT2_CDFS_OPT_NOCASETRANS) && defined(MNTTAB_OPT_NOCASETRANS) */ + +#if defined(MNT2_CDFS_OPT_NOJOLIET) && defined(MNTTAB_OPT_NOJOLIET) + if (amu_hasmntopt(&mnt, MNTTAB_OPT_NOJOLIET)) + cdfs_flags |= MNT2_CDFS_OPT_NOJOLIET; +#endif /* defined(MNT2_CDFS_OPT_NOJOLIET) && defined(MNTTAB_OPT_NOJOLIET) */ + +#if defined(MNT2_CDFS_OPT_RRCASEINS) && defined(MNTTAB_OPT_RRCASEINS) + if (amu_hasmntopt(&mnt, MNTTAB_OPT_RRCASEINS)) + cdfs_flags |= MNT2_CDFS_OPT_RRCASEINS; +#endif /* defined(MNT2_CDFS_OPT_RRCASEINS) && defined(MNTTAB_OPT_RRCASEINS) */ + genflags = compute_mount_flags(&mnt); #ifdef HAVE_FS_AUTOFS if (on_autofs) diff --git a/configure.in b/configure.in index 215f8c7..71a60d0 100644 --- a/configure.in +++ b/configure.in @@ -55,7 +55,7 @@ AH_BOTTOM([ dnl dnl AC_CONFIG_AUX_DIR(m4) AC_PREREQ(2.52) -AC_REVISION($Revision: 1.131 $) +AC_REVISION($Revision: 1.132 $) AC_COPYRIGHT([Copyright (c) 1997-2007 Erez Zadok]) dnl find out system type AC_MSG_NOTICE(*** SYSTEM TYPES ***) @@ -1263,9 +1263,12 @@ AMU_CHECK_MNT2_CDFS_OPTS(\ defperm \ extatt \ gens \ + nocasetrans \ nodefperm \ + nojoliet \ norrip \ noversion \ + rrcaseins \ rrip \ ) dnl ====================================================================== diff --git a/doc/am-utils.texi b/doc/am-utils.texi index 5072d16..8f8b564 100644 --- a/doc/am-utils.texi +++ b/doc/am-utils.texi @@ -2200,6 +2200,11 @@ is used. Do not allow data to be cached from a remote server for this mount. +@item nocasetrans +@cindex Mount flags; nocasetrans +Don't do case translation. Useful for CD-ROMS formatted as +ISO-9660. + @item noconn @cindex Mount flags; noconn Don't make a connection on datagram transports. @@ -2227,6 +2232,10 @@ Don't allow program execution. @cindex Mount flags; noint Do not allow keyboard interrupts for this mount +@item nojoliet +@cindex Mount flags; nojoliet +Turn off the Joliet extensions. Useful for CD-ROMS formatted as ISO-9660. + @item nolock @cindex Mount flags; nolock Do not use the NFS locking protocol @@ -2321,6 +2330,11 @@ trying}. @cindex Mount flags; retry Set the NFS retry counter. +@item rrcaseins +@cindex Mount flags; rrcaseins +Enable the Rock Ridge Interchange Protocol (RRIP) case insensitive extensions. +Useful for CD-ROMS formatted as ISO-9660. + @item rrip @cindex Mount flags; rrip Uses the Rock Ridge Interchange Protocol (RRIP) extensions to ISO-9660. diff --git a/include/am_compat.h b/include/am_compat.h index 2eed192..e3a06dd 100644 --- a/include/am_compat.h +++ b/include/am_compat.h @@ -176,10 +176,24 @@ #if defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS) # define MNTTAB_OPT_GENS "gens" #endif /* defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS) */ + #if defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT) # define MNTTAB_OPT_EXTATT "extatt" #endif /* defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT) */ +#if defined(MNT2_CDFS_OPT_NOJOLIET) && !defined(MNTTAB_OPT_NOJOLIET) +# define MNTTAB_OPT_NOJOLIET "nojoliet" +#endif /* defined(MNT2_CDFS_OPT_NOJOLIET) && !defined(MNTTAB_OPT_NOJOLIET) */ + +#if defined(MNT2_CDFS_OPT_NOCASETRANS) && !defined(MNTTAB_OPT_NOCASETRANS) +# define MNTTAB_OPT_NOCASETRANS "nocasetrans" +#endif /* defined(MNT2_CDFS_OPT_NOCASETRANS) && !defined(MNTTAB_OPT_NOCASETRANS) */ + +#if defined(MNT2_CDFS_OPT_RRCASEINS) && !defined(MNTTAB_OPT_RRCASEINS) +# define MNTTAB_OPT_RRCASEINS "rrcaseins" +#endif /* defined(MNT2_CDFS_OPT_RRCASEINS) && !defined(MNTTAB_OPT_RRCASEINS) */ + + /* * Complete MNTTAB_OPT_* options based on MNT2_PCFS_OPT_* mount options. */ -- 2.43.0