Lines Matching refs:bufsize

62 	unsigned int bufsize;  in copyin()  local
67 if (get_user(bufsize, &info->oprom_size)) in copyin()
70 if (bufsize == 0) in copyin()
76 if (bufsize > OPROMMAXPARAM) in copyin()
77 bufsize = OPROMMAXPARAM; in copyin()
79 if (!(*opp_p = kzalloc(sizeof(int) + bufsize + 1, GFP_KERNEL))) in copyin()
83 &info->oprom_array, bufsize)) { in copyin()
87 return bufsize; in copyin()
92 int n, bufsize; in getstrings() local
103 n = bufsize = 0; in getstrings()
104 while ((n < 2) && (bufsize < OPROMMAXPARAM)) { in getstrings()
105 if (get_user(c, &info->oprom_array[bufsize])) { in getstrings()
111 (*opp_p)->oprom_array[bufsize++] = c; in getstrings()
117 return bufsize; in getstrings()
130 …tic int opromgetprop(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize) in opromgetprop() argument
137 len <= 0 || len > bufsize) in opromgetprop()
144 return copyout(argp, op, sizeof(int) + bufsize); in opromgetprop()
147 …tic int opromnxtprop(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize) in opromnxtprop() argument
164 (len = strlen(prop->next->name)) + 1 > bufsize) in opromnxtprop()
174 return copyout(argp, op, sizeof(int) + bufsize); in opromnxtprop()
177 static int opromsetopt(struct device_node *dp, struct openpromio *op, int bufsize) in opromsetopt() argument
180 int len = op->oprom_array + bufsize - buf; in opromsetopt()
185 …er *argp, unsigned int cmd, struct device_node *dp, struct openpromio *op, int bufsize, DATA *data) in opromnext() argument
191 if (bufsize < sizeof(phandle)) in opromnext()
229 return copyout(argp, op, bufsize + sizeof(int)); in opromnext()
232 …pci2node(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize, DATA *data) in oprompci2node() argument
236 if (bufsize >= 2*sizeof(int)) { in oprompci2node()
249 err = copyout(argp, op, bufsize + sizeof(int)); in oprompci2node()
258 …ath2node(void __user *argp, struct device_node *dp, struct openpromio *op, int bufsize, DATA *data) in oprompath2node() argument
269 return copyout(argp, op, bufsize + sizeof(int)); in oprompath2node()
272 static int opromgetbootargs(void __user *argp, struct openpromio *op, int bufsize) in opromgetbootargs() argument
277 if (len > bufsize) in opromgetbootargs()
283 return copyout(argp, op, bufsize + sizeof(int)); in opromgetbootargs()
295 int bufsize, error = 0; in openprom_sunos_ioctl() local
300 bufsize = getstrings(argp, &opp); in openprom_sunos_ioctl()
302 bufsize = copyin(argp, &opp); in openprom_sunos_ioctl()
304 if (bufsize < 0) in openprom_sunos_ioctl()
305 return bufsize; in openprom_sunos_ioctl()
312 error = opromgetprop(argp, dp, opp, bufsize); in openprom_sunos_ioctl()
317 error = opromnxtprop(argp, dp, opp, bufsize); in openprom_sunos_ioctl()
322 error = opromsetopt(dp, opp, bufsize); in openprom_sunos_ioctl()
328 error = opromnext(argp, cmd, dp, opp, bufsize, data); in openprom_sunos_ioctl()
332 error = oprompci2node(argp, dp, opp, bufsize, data); in openprom_sunos_ioctl()
336 error = oprompath2node(argp, dp, opp, bufsize, data); in openprom_sunos_ioctl()
340 error = opromgetbootargs(argp, opp, bufsize); in openprom_sunos_ioctl()