From 926d4fe99cc495fad44ddf98c8e02ded9bce4fe3 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Sun, 11 Jan 2009 22:52:46 +0000 Subject: [PATCH] * amd/ops_udf.c: don't define functions/variables which may not be used. * amd/ops_tmpfs.c (mount_tmpfs): force gcc not to complain about unused variables. * config.guess.long: properly support Fedora Core. --- ChangeLog | 10 ++++++++++ amd/ops_tmpfs.c | 1 + amd/ops_udf.c | 20 +++++++++++++------- config.guess.long | 2 +- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ffbfe7..f9cd81b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-01-11 Erez Zadok + + * amd/ops_udf.c: don't define functions/variables which may not be + used. + + * amd/ops_tmpfs.c (mount_tmpfs): force gcc not to complain about + unused variables. + + * config.guess.long: properly support Fedora Core. + 2009-01-09 Christos Zoulas * Fix nfs mounts on linux 2.6.26 by explicitly initializing context. diff --git a/amd/ops_tmpfs.c b/amd/ops_tmpfs.c index 84e4180..0689944 100644 --- a/amd/ops_tmpfs.c +++ b/amd/ops_tmpfs.c @@ -115,6 +115,7 @@ mount_tmpfs(char *mntdir, char *fs_name, char *opts, int on_autofs) */ MTYPE_TYPE type = MOUNT_TYPE_TMPFS; + p = NULL; memset((voidp) &tmpfs_args, 0, sizeof(tmpfs_args)); /* Paranoid */ /* diff --git a/amd/ops_udf.c b/amd/ops_udf.c index 35c7a1d..4b5ed88 100644 --- a/amd/ops_udf.c +++ b/amd/ops_udf.c @@ -1,5 +1,3 @@ -/* $NetBSD: ops_pcfs.c,v 1.1.1.1 2008/09/19 20:07:16 christos Exp $ */ - /* * Copyright (c) 1997-2007 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry @@ -82,6 +80,7 @@ am_ops udf_ops = #endif /* HAVE_FS_AUTOFS */ }; +#if defined(HAVE_UDF_ARGS_T_NOBODY_GID) || defined(HAVE_UDF_ARGS_T_NOBODY_UID) static int a_num(const char *s, const char *id_type) { @@ -95,7 +94,9 @@ a_num(const char *s, const char *id_type) } return id; } +#endif /* defined(HAVE_UDF_ARGS_T_NOBODY_GID) || defined(HAVE_UDF_ARGS_T_NOBODY_UID) */ +#if defined(HAVE_UDF_ARGS_T_NOBODY_GID) static gid_t a_gid(const char *s, const char *id_type) { @@ -105,7 +106,9 @@ a_gid(const char *s, const char *id_type) return gr->gr_gid; return a_num(s, id_type); } +#endif /* defined(HAVE_UDF_ARGS_T_NOBODY_GID) */ +#if defined(HAVE_UDF_ARGS_T_NOBODY_UID) static uid_t a_uid(const char *s, const char *id_type) { @@ -115,6 +118,7 @@ a_uid(const char *s, const char *id_type) return pw->pw_uid; return a_num(s, id_type); } +#endif /* defined(HAVE_UDF_ARGS_T_NOBODY_UID) */ /* * UDF needs remote filesystem. @@ -142,8 +146,14 @@ mount_udf(char *mntdir, char *fs_name, char *opts, int on_autofs) mntent_t mnt; int flags; char *str; +#if defined(HAVE_UDF_ARGS_T_NOBODY_UID) || defined(HAVE_UDF_ARGS_T_ANON_UID) uid_t uid_nobody; gid_t gid_nobody; +#endif /* defined(HAVE_UDF_ARGS_T_NOBODY_UID) || defined(HAVE_UDF_ARGS_T_ANON_UID) */ + /* + * Figure out the name of the file system type. + */ + MTYPE_TYPE type = MOUNT_TYPE_UDF; #if defined(HAVE_UDF_ARGS_T_NOBODY_UID) || defined(HAVE_UDF_ARGS_T_ANON_UID) uid_nobody = a_uid("nobody", "user"); @@ -161,11 +171,7 @@ mount_udf(char *mntdir, char *fs_name, char *opts, int on_autofs) } #endif /* defined(HAVE_UDF_ARGS_T_NOBODY_GID) || defined(HAVE_UDF_ARGS_T_ANON_GID) */ - /* - * Figure out the name of the file system type. - */ - MTYPE_TYPE type = MOUNT_TYPE_UDF; - + str = NULL; memset((voidp) &udf_args, 0, sizeof(udf_args)); /* Paranoid */ /* diff --git a/config.guess.long b/config.guess.long index 2d2ea5c..769d0b9 100755 --- a/config.guess.long +++ b/config.guess.long @@ -33,7 +33,7 @@ case "${GCONFIG}" in long=`getver /etc/redhat-release` if grep 'Red Hat Enterprise Linux' /etc/redhat-release > /dev/null 2>&1 ; then echo ${GCONFIG}-rhel${long} - elif grep 'Fedora Core' /etc/redhat-release > /dev/null 2>&1 ; then + elif grep 'Fedora ' /etc/redhat-release > /dev/null 2>&1 ; then echo ${GCONFIG}-fc${long} elif grep 'CentOS' /etc/redhat-release > /dev/null 2>&1 ; then echo ${GCONFIG}-centos${long} -- 2.43.0