Lines Matching refs:param

56 static int check_dev_ioctl_version(int cmd, struct autofs_dev_ioctl *param)  in check_dev_ioctl_version()  argument
60 if ((param->ver_major != AUTOFS_DEV_IOCTL_VERSION_MAJOR) || in check_dev_ioctl_version()
61 (param->ver_minor > AUTOFS_DEV_IOCTL_VERSION_MINOR)) { in check_dev_ioctl_version()
66 param->ver_major, param->ver_minor, cmd); in check_dev_ioctl_version()
71 param->ver_major = AUTOFS_DEV_IOCTL_VERSION_MAJOR; in check_dev_ioctl_version()
72 param->ver_minor = AUTOFS_DEV_IOCTL_VERSION_MINOR; in check_dev_ioctl_version()
102 static inline void free_dev_ioctl(struct autofs_dev_ioctl *param) in free_dev_ioctl() argument
104 kfree(param); in free_dev_ioctl()
111 static int validate_dev_ioctl(int cmd, struct autofs_dev_ioctl *param) in validate_dev_ioctl() argument
116 err = check_dev_ioctl_version(cmd, param); in validate_dev_ioctl()
123 if (param->size > AUTOFS_DEV_IOCTL_SIZE) { in validate_dev_ioctl()
124 err = invalid_str(param->path, param->size - AUTOFS_DEV_IOCTL_SIZE); in validate_dev_ioctl()
136 err = check_name(param->path); in validate_dev_ioctl()
161 struct autofs_dev_ioctl *param) in autofs_dev_ioctl_version() argument
164 param->ver_major = AUTOFS_DEV_IOCTL_VERSION_MAJOR; in autofs_dev_ioctl_version()
165 param->ver_minor = AUTOFS_DEV_IOCTL_VERSION_MINOR; in autofs_dev_ioctl_version()
172 struct autofs_dev_ioctl *param) in autofs_dev_ioctl_protover() argument
174 param->protover.version = sbi->version; in autofs_dev_ioctl_protover()
181 struct autofs_dev_ioctl *param) in autofs_dev_ioctl_protosubver() argument
183 param->protosubver.sub_version = sbi->sub_version; in autofs_dev_ioctl_protosubver()
265 struct autofs_dev_ioctl *param) in autofs_dev_ioctl_openmount() argument
273 if (!param->openmount.devid) in autofs_dev_ioctl_openmount()
276 param->ioctlfd = -1; in autofs_dev_ioctl_openmount()
278 path = param->path; in autofs_dev_ioctl_openmount()
279 devid = new_decode_dev(param->openmount.devid); in autofs_dev_ioctl_openmount()
288 param->ioctlfd = fd; in autofs_dev_ioctl_openmount()
296 struct autofs_dev_ioctl *param) in autofs_dev_ioctl_closemount() argument
298 return close_fd(param->ioctlfd); in autofs_dev_ioctl_closemount()
307 struct autofs_dev_ioctl *param) in autofs_dev_ioctl_ready() argument
311 token = (autofs_wqt_t) param->ready.token; in autofs_dev_ioctl_ready()
321 struct autofs_dev_ioctl *param) in autofs_dev_ioctl_fail() argument
326 token = (autofs_wqt_t) param->fail.token; in autofs_dev_ioctl_fail()
327 status = param->fail.status < 0 ? param->fail.status : -ENOENT; in autofs_dev_ioctl_fail()
345 struct autofs_dev_ioctl *param) in autofs_dev_ioctl_setpipefd() argument
351 if (param->setpipefd.pipefd == -1) in autofs_dev_ioctl_setpipefd()
354 pipefd = param->setpipefd.pipefd; in autofs_dev_ioctl_setpipefd()
398 struct autofs_dev_ioctl *param) in autofs_dev_ioctl_catatonic() argument
430 struct autofs_dev_ioctl *param) in autofs_dev_ioctl_timeout() argument
432 unsigned long timeout = param->timeout.timeout; in autofs_dev_ioctl_timeout()
440 if (param->size == AUTOFS_DEV_IOCTL_SIZE) { in autofs_dev_ioctl_timeout()
441 param->timeout.timeout = sbi->exp_timeout / HZ; in autofs_dev_ioctl_timeout()
446 int path_len = param->size - AUTOFS_DEV_IOCTL_SIZE - 1; in autofs_dev_ioctl_timeout()
464 dentry = try_lookup_one_len(param->path, base, path_len); in autofs_dev_ioctl_timeout()
475 param->timeout.timeout = ino->exp_timeout / HZ; in autofs_dev_ioctl_timeout()
477 param->timeout.timeout = sbi->exp_timeout / HZ; in autofs_dev_ioctl_timeout()
508 struct autofs_dev_ioctl *param) in autofs_dev_ioctl_requester() argument
519 param->requester.uid = param->requester.gid = -1; in autofs_dev_ioctl_requester()
521 err = find_autofs_mount(param->path, &path, test_by_dev, &devid); in autofs_dev_ioctl_requester()
530 param->requester.uid = in autofs_dev_ioctl_requester()
532 param->requester.gid = in autofs_dev_ioctl_requester()
547 struct autofs_dev_ioctl *param) in autofs_dev_ioctl_expire() argument
552 how = param->expire.how; in autofs_dev_ioctl_expire()
561 struct autofs_dev_ioctl *param) in autofs_dev_ioctl_askumount() argument
563 param->askumount.may_umount = 0; in autofs_dev_ioctl_askumount()
565 param->askumount.may_umount = 1; in autofs_dev_ioctl_askumount()
592 struct autofs_dev_ioctl *param) in autofs_dev_ioctl_ismountpoint() argument
602 name = param->path; in autofs_dev_ioctl_ismountpoint()
603 type = param->ismountpoint.in.type; in autofs_dev_ioctl_ismountpoint()
605 param->ismountpoint.out.devid = devid = 0; in autofs_dev_ioctl_ismountpoint()
606 param->ismountpoint.out.magic = magic = 0; in autofs_dev_ioctl_ismountpoint()
608 if (!fp || param->ioctlfd == -1) { in autofs_dev_ioctl_ismountpoint()
638 param->ismountpoint.out.devid = devid; in autofs_dev_ioctl_ismountpoint()
639 param->ismountpoint.out.magic = magic; in autofs_dev_ioctl_ismountpoint()
682 struct autofs_dev_ioctl *param; in _autofs_dev_ioctl() local
706 param = copy_dev_ioctl(user); in _autofs_dev_ioctl()
707 if (IS_ERR(param)) in _autofs_dev_ioctl()
708 return PTR_ERR(param); in _autofs_dev_ioctl()
710 err = validate_dev_ioctl(command, param); in _autofs_dev_ioctl()
735 fp = fget(param->ioctlfd); in _autofs_dev_ioctl()
763 err = fn(fp, sbi, param); in _autofs_dev_ioctl()
767 if (err >= 0 && copy_to_user(user, param, AUTOFS_DEV_IOCTL_SIZE)) in _autofs_dev_ioctl()
770 free_dev_ioctl(param); in _autofs_dev_ioctl()