To use this option, you have to ensure that the "/proc file system
support" (CONFIG_PROC_FS) is enabled, too.
-config IA64_SALINFO
- tristate "/proc/sal support"
- help
- The /proc/sal directory exports the SAL (system abstraction layer)
- feature bits, like whether the platform is subject to ITC drift. It
- is intended to be used by user programs that care about such things.
-
- To use this option, you have to ensure that the "/proc file system
- support" (CONFIG_PROC_FS) is enabled, too.
+
+ config EFI
+ bool
+ depends on !IA64_HP_SIM
+ default y
+
config EFI_VARS
tristate "/proc/efi/vars support"
help
if (!desc->handler->set_affinity)
return -EIO;
- if (buf[0] == 'r' || buf[0] == 'R') {
- ++buf;
- while (*buf == ' ') ++buf;
- redir = 1;
- } else
- redir = 0;
+ /*
+ * If string being written starts with a prefix of 'r' or 'R'
+ * and some limited number of spaces, set IA64_IRQ_REDIRECTED.
+ * If more than (R_PREFIX_LEN - 2) spaces are passed, they won't
+ * all be trimmed as part of prelen, the untrimmed spaces will
+ * cause the hex parsing to fail, and this write() syscall will
+ * fail with EINVAL.
+ */
+
+ if (!count)
+ return -EINVAL;
+ rlen = min(sizeof(rbuf)-1, count);
+ if (copy_from_user(rbuf, buffer, rlen))
+ return -EFAULT;
+ rbuf[rlen] = 0;
+ prelen = 0;
+ if (tolower(*rbuf) == 'r') {
+ prelen = strspn(rbuf, "Rr ");
+ irq |= IA64_IRQ_REDIRECTED;
+ }
- err = parse_hex_value(buffer+prelen, count-prelen, &new_value);
- err = cpumask_parse(buf, count - (buf-buffer), new_value);
++ err = cpumask_parse(buffer+prelen, count-prelen, new_value);
if (err)
return err;