Changeset 43148f0 in rtems-libbsd


Ignore:
Timestamp:
Oct 18, 2013, 1:56:31 PM (7 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, b96abfd647154f10ea8f7fac68e25676636eded5, 7d194e5f55b4aad6abbd096c30d2dd22531c73cf, freebsd-9.3, 6da0dda3255e2a49365aee6904fe00d4f2ca9d68
Children:
c14bb23
Parents:
4e14ded
git-author:
Sebastian Huber <sebastian.huber@…> (10/18/13 13:56:31)
git-committer:
Sebastian Huber <sebastian.huber@…> (10/31/13 12:18:49)
Message:

IFCONFIG(8): Avoid JAIL(3)

Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd/sbin/ifconfig/ifconfig.c

    r4e14ded r43148f0  
    7373#include <errno.h>
    7474#include <fcntl.h>
    75 
    76 #ifndef __rtems__
    7775#include <jail.h>
    78 #endif
    7976
    8077#include <stdio.h>
     
    680677}
    681678
     679#ifndef __rtems__
    682680static void
    683681setifvnet(const char *jname, int dummy __unused, int s,
     
    687685
    688686        memcpy(&my_ifr, &ifr, sizeof(my_ifr));
    689 #ifndef __rtems__
    690687        my_ifr.ifr_jid = jail_getid(jname);
    691688        if (my_ifr.ifr_jid < 0)
    692689                errx(1, "%s", jail_errmsg);
    693 #endif
    694690        if (ioctl(s, SIOCSIFVNET, &my_ifr) < 0)
    695691                err(1, "SIOCSIFVNET");
     
    703699
    704700        memcpy(&my_ifr, &ifr, sizeof(my_ifr));
    705 #ifndef __rtems__
    706701        my_ifr.ifr_jid = jail_getid(jname);
    707702        if (my_ifr.ifr_jid < 0)
    708703                errx(1, "%s", jail_errmsg);
    709 #endif
    710704        if (ioctl(s, SIOCSIFRVNET, &my_ifr) < 0)
    711705                err(1, "SIOCSIFRVNET(%d, %s)", my_ifr.ifr_jid, my_ifr.ifr_name);
    712706}
     707#endif /* __rtems__ */
    713708
    714709static void
     
    11561151        DEF_CMD("-tunnel", 0,                   deletetunnel),
    11571152        DEF_CMD("deletetunnel", 0,              deletetunnel),
     1153#ifndef __rtems__
    11581154        DEF_CMD_ARG("vnet",                     setifvnet),
    11591155        DEF_CMD_ARG("-vnet",                    setifrvnet),
     1156#endif /* __rtems__ */
    11601157        DEF_CMD("link0",        IFF_LINK0,      setifflags),
    11611158        DEF_CMD("-link0",       -IFF_LINK0,     setifflags),
Note: See TracChangeset for help on using the changeset viewer.