| 87 | } |
| 88 | |
| 89 | static void |
| 90 | setifgrekey(const char *val, int dummy __unused, int s, |
| 91 | const struct afswtch *afp) |
| 92 | { |
| 93 | uint32_t grekey = strtol(val, NULL, 0); |
| 94 | |
| 95 | strlcpy(ifr.ifr_name, name, sizeof (ifr.ifr_name)); |
| 96 | ifr.ifr_data = (caddr_t)&grekey; |
| 97 | #ifndef FSTACK |
| 98 | if (ioctl(s, GRESKEY, (caddr_t)&ifr) < 0) |
| 99 | #else |
| 100 | size_t offset = (char *)&(ifr.ifr_data) - (char *)&(ifr); |
| 101 | size_t clen = sizeof(uint32_t); |
| 102 | if (ioctl_va(s, GRESKEY, (caddr_t)&ifr, 3, offset, ifr.ifr_data, clen) < 0) |
| 103 | #endif |
| 104 | warn("ioctl (set grekey)"); |
| 105 | } |
| 106 | |
| 107 | static void |
| 108 | setifgreport(const char *val, int dummy __unused, int s, |