diff options
author | Karel Zak | 2012-06-19 16:19:18 +0200 |
---|---|---|
committer | Karel Zak | 2012-06-19 16:19:18 +0200 |
commit | 23966912fbbc74980a0900c3d29613f038fad791 (patch) | |
tree | 55537f806391d936bf8a5d7b8e08217f37d42124 /libmount/src/optstr.c | |
parent | lsblk: add --include option (diff) | |
download | kernel-qcow2-util-linux-23966912fbbc74980a0900c3d29613f038fad791.tar.gz kernel-qcow2-util-linux-23966912fbbc74980a0900c3d29613f038fad791.tar.xz kernel-qcow2-util-linux-23966912fbbc74980a0900c3d29613f038fad791.zip |
libmount: improve ifdef HAVE_LIBSELINUX stuff
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/optstr.c')
-rw-r--r-- | libmount/src/optstr.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libmount/src/optstr.c b/libmount/src/optstr.c index cc1bef84f..08c12150e 100644 --- a/libmount/src/optstr.c +++ b/libmount/src/optstr.c @@ -774,14 +774,22 @@ err: * * Returns: 0 on success, negative number in case of error. */ +#ifndef HAVE_LIBSELINUX int mnt_optstr_fix_secontext(char **optstr __attribute__ ((__unused__)), char *value __attribute__ ((__unused__)), size_t valsz __attribute__ ((__unused__)), char **next __attribute__ ((__unused__))) { + return 0; +} +#else +int mnt_optstr_fix_secontext(char **optstr, + char *value, + size_t valsz, + char **next) +{ int rc = 0; -#ifdef HAVE_LIBSELINUX security_context_t raw = NULL; char *p, *val, *begin, *end; size_t sz; @@ -839,9 +847,10 @@ int mnt_optstr_fix_secontext(char **optstr __attribute__ ((__unused__)), mnt_optstr_remove_option_at(optstr, begin, end); rc = insert_value(optstr, begin, val, next); free(val); -#endif + return rc; } +#endif static int set_uint_value(char **optstr, unsigned int num, char *begin, char *end, char **next) |