mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-11-30 15:00:22 +00:00
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:
parent
91d9fe8af0
commit
5f8ce37021
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user