| 1321 | } |
| 1322 | |
| 1323 | void |
| 1324 | setifcap(const char *vname, int value, int s, const struct afswtch *afp) |
| 1325 | { |
| 1326 | int flags; |
| 1327 | |
| 1328 | if (ioctl(s, SIOCGIFCAP, (caddr_t)&ifr) < 0) { |
| 1329 | Perror("ioctl (SIOCGIFCAP)"); |
| 1330 | #ifdef FSTACK |
| 1331 | ff_ipc_exit(); |
| 1332 | #endif |
| 1333 | exit(1); |
| 1334 | } |
| 1335 | flags = ifr.ifr_curcap; |
| 1336 | if (value < 0) { |
| 1337 | value = -value; |
| 1338 | flags &= ~value; |
| 1339 | } else |
| 1340 | flags |= value; |
| 1341 | flags &= ifr.ifr_reqcap; |
| 1342 | ifr.ifr_reqcap = flags; |
| 1343 | if (ioctl(s, SIOCSIFCAP, (caddr_t)&ifr) < 0) |
| 1344 | Perror(vname); |
| 1345 | } |
| 1346 | |
| 1347 | static void |
| 1348 | setifmetric(const char *val, int dummy __unused, int s, |
nothing calls this directly
no test coverage detected