X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=libsysio%2Fsrc%2Finit.c;h=6dc4f291e19546777f5ea16b69e6f9719df9159f;hb=357de3461d95f693d416e380dd4963533f44ea25;hp=c82d601a6f55a759e6ef22449a41b067ee661b6b;hpb=20d0187e95be6ec8c131a9bb8691e7d939875e68;p=fs%2Flustre-release.git diff --git a/libsysio/src/init.c b/libsysio/src/init.c index c82d601..6dc4f29 100644 --- a/libsysio/src/init.c +++ b/libsysio/src/init.c @@ -45,17 +45,17 @@ #define _BSD_SOURCE #endif -#if SYSIO_TRACING +#ifdef SYSIO_TRACING #include #endif #include -#ifdef _BSD_SOURCE +#if defined(_BSD_SOURCE) || defined(SYSIO_TRACING) #include #endif #include #include #include -#if SYSIO_TRACING +#ifdef SYSIO_TRACING #include #endif #include @@ -68,7 +68,7 @@ #include "sysio.h" #include "xtio.h" -#if SYSIO_TRACING +#ifdef SYSIO_TRACING #include "native.h" #endif #include "inode.h" @@ -81,7 +81,7 @@ #include "stdfd.h" #endif -#if SYSIO_TRACING +#ifdef SYSIO_TRACING /* * Tracing callback record. @@ -104,7 +104,7 @@ struct trace_callback { (__tcb)->f = (__f); \ (__tcb)->data = (__d); \ (__tcb)->destructor = (__destroy); \ - } while (0); + } while (0) /* * Trace queue head record. @@ -160,7 +160,7 @@ _sysio_init() extern int _sysio_sockets_init(void); #endif -#if SYSIO_TRACING +#ifdef SYSIO_TRACING /* * Initialize tracing callback queues. */ @@ -214,12 +214,13 @@ _sysio_shutdown() _sysio_unmount_all() == 0)) abort(); -#if ZERO_SUM_MEMORY +#ifdef ZERO_SUM_MEMORY _sysio_fd_shutdown(); _sysio_i_shutdown(); _sysio_fssw_shutdown(); _sysio_access_shutdown(); -#if SYSIO_TRACING + free(incore_dir_template); +#ifdef SYSIO_TRACING { struct trace_callback *tcb; @@ -235,7 +236,7 @@ _sysio_shutdown() #endif } -#if SYSIO_TRACING +#ifdef SYSIO_TRACING #if !(defined(_HAVE_ASPRINTF) && _HAVE_ASPRINTF) /* @@ -929,7 +930,7 @@ do_command(char *buf) return -EINVAL; } -#if SYSIO_TRACING +#ifdef SYSIO_TRACING /* * Set/Unset tracing. */ @@ -1040,7 +1041,7 @@ _sysio_boot_namespace(const char *arg) if (err) break; } -#if SYSIO_TRACING +#ifdef SYSIO_TRACING if (err) _sysio_cprintf("+NS init+ failed at expr %u (last = %s): %s\n", count, @@ -1051,7 +1052,7 @@ _sysio_boot_namespace(const char *arg) return err; } -#if DEFER_INIT_CWD +#ifdef DEFER_INIT_CWD /* * Set deferred initial working directory. */ @@ -1067,15 +1068,15 @@ _sysio_boot_cwd(const char *arg) /* * Given an identifier and it's arguments, perform optional initializations. */ -int +int _sysio_boot(const char *opt, const char *arg) { struct option_value_info vec[] = { -#if SYSIO_TRACING +#ifdef SYSIO_TRACING { "trace", NULL }, /* tracing? */ #endif { "namespace", NULL }, /* init namespace? */ -#if DEFER_INIT_CWD +#ifdef DEFER_INIT_CWD { "cwd", NULL }, /* init working dir */ #endif { NULL, NULL } @@ -1083,11 +1084,11 @@ _sysio_boot(const char *opt, const char *arg) struct option_value_info *v; unsigned u; static int (*f[])(const char *) = { -#if SYSIO_TRACING +#ifdef SYSIO_TRACING _sysio_boot_tracing, #endif _sysio_boot_namespace, -#if DEFER_INIT_CWD +#ifdef DEFER_INIT_CWD _sysio_boot_cwd, #endif NULL /* can't happen */