libselinux: Fix const-ness of parameters & make usage() methods static

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel P. Berrange 2012-01-23 15:41:19 +00:00 committed by Eric Paris
parent 91d9fe8af0
commit 5f8ce37021
8 changed files with 9 additions and 9 deletions

View File

@ -9,7 +9,7 @@
#include <selinux/selinux.h>
#include <selinux/get_context_list.h>
void usage(char *name, char *detail, int rc)
static void usage(const char *name, const char *detail, int rc)
{
fprintf(stderr, "usage: %s [-l level] user [context]\n", name);
if (detail)

View File

@ -9,7 +9,7 @@
#include <selinux/selinux.h>
#include <selinux/get_context_list.h>
void usage(char *name, char *detail, int rc)
static void usage(const char *name, const char *detail, int rc)
{
fprintf(stderr, "usage: %s [-l level] user fromcon\n", name);
if (detail)

View File

@ -6,7 +6,7 @@
#include <string.h>
#include <selinux/selinux.h>
void usage(const char *progname)
static void usage(const char *progname)
{
fprintf(stderr, "usage: %s -a or %s boolean...\n", progname, progname);
exit(1);

View File

@ -13,7 +13,7 @@
#include <stdlib.h>
void usage(const char *progname)
static void usage(const char *progname)
{
fprintf(stderr,
"usage: %s [-N] [-n] [-f file_contexts] [-p prefix] [-Vq] path...\n",
@ -21,7 +21,7 @@ void usage(const char *progname)
exit(1);
}
int printmatchpathcon(char *path, int header, int mode)
static int printmatchpathcon(const char *path, int header, int mode)
{
char *buf;
int rc = matchpathcon(path, mode, &buf);

View File

@ -9,7 +9,7 @@
#include <sys/errno.h>
#include <selinux/selinux.h>
void usage(const char *progname)
static void usage(const char *progname)
{
fprintf(stderr, "usage: %s tty_context...\n", progname);
exit(1);

View File

@ -9,7 +9,7 @@
#include <selinux/flask.h>
#include <selinux/selinux.h>
void usage(char *name, char *detail, int rc)
static void usage(const char *name, const char *detail, int rc)
{
fprintf(stderr, "usage: %s command [ fromcon ]\n", name);
if (detail)

View File

@ -6,7 +6,7 @@
#include <strings.h>
#include <selinux/selinux.h>
void usage(const char *progname)
static void usage(const char *progname)
{
fprintf(stderr, "usage: %s [ Enforcing | Permissive | 1 | 0 ]\n",
progname);

View File

@ -10,7 +10,7 @@
/* Attempt to rollback the transaction. No need to check error
codes since this is rolling back something that blew up. */
void rollback(int argc, char **argv)
static void rollback(int argc, char **argv)
{
int i;