Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5878aa92 authored by Elliott Hughes's avatar Elliott Hughes
Browse files

Remove obsolete setkey.

It's undocumented and unused.

Change-Id: I685dc900adbc14f2e8b4eeebb1e4d111782f141d
parent 821b8570
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
@@ -67,20 +67,6 @@ static int insmod(const char *filename, char *options)
    return init_module(&module[0], module.size(), options);
}

static int setkey(struct kbentry *kbe)
{
    int fd, ret;

    fd = open("/dev/tty0", O_RDWR | O_SYNC | O_CLOEXEC);
    if (fd < 0)
        return -1;

    ret = ioctl(fd, KDSKBENT, kbe);

    close(fd);
    return ret;
}

static int __ifupdown(const char *interface, int up)
{
    struct ifreq ifr;
@@ -571,15 +557,6 @@ int do_setcon(int nargs, char **args) {
    return 0;
}

int do_setkey(int nargs, char **args)
{
    struct kbentry kbe;
    kbe.kb_table = strtoul(args[1], 0, 0);
    kbe.kb_index = strtoul(args[2], 0, 0);
    kbe.kb_value = strtoul(args[3], 0, 0);
    return setkey(&kbe);
}

int do_setprop(int nargs, char **args)
{
    const char *name = args[1];
+0 −1
Original line number Diff line number Diff line
@@ -187,7 +187,6 @@ static int lookup_keyword(const char *s)
        if (!strcmp(s, "ervice")) return K_service;
        if (!strcmp(s, "etcon")) return K_setcon;
        if (!strcmp(s, "etenv")) return K_setenv;
        if (!strcmp(s, "etkey")) return K_setkey;
        if (!strcmp(s, "etprop")) return K_setprop;
        if (!strcmp(s, "etrlimit")) return K_setrlimit;
        if (!strcmp(s, "ocket")) return K_socket;
+0 −2
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ int do_restorecon_recursive(int nargs, char **args);
int do_rm(int nargs, char **args);
int do_rmdir(int nargs, char **args);
int do_setcon(int nargs, char **args);
int do_setkey(int nargs, char **args);
int do_setprop(int nargs, char **args);
int do_setrlimit(int nargs, char **args);
int do_start(int nargs, char **args);
@@ -83,7 +82,6 @@ enum {
    KEYWORD(service,     SECTION, 0, 0)
    KEYWORD(setcon,      COMMAND, 1, do_setcon)
    KEYWORD(setenv,      OPTION,  2, 0)
    KEYWORD(setkey,      COMMAND, 0, do_setkey)
    KEYWORD(setprop,     COMMAND, 2, do_setprop)
    KEYWORD(setrlimit,   COMMAND, 3, do_setrlimit)
    KEYWORD(socket,      OPTION,  0, 0)
+0 −3
Original line number Diff line number Diff line
@@ -228,9 +228,6 @@ setcon <seclabel>
   This is typically only used from early-init to set the init context
   before any other process is started.

setkey
   TBD

setprop <name> <value>
   Set system property <name> to <value>. Properties are expanded
   within <value>.