2416 case _PC_SATTR_EXISTS:
2417 *valp = vfs_has_feature(vp->v_vfsp, VFSFT_SYSATTR_VIEWS) &&
2418 (vp->v_type == VREG || vp->v_type == VDIR);
2419 error = 0;
2420 break;
2421 case _PC_TIMESTAMP_RESOLUTION:
2422 /* nanosecond timestamp resolution */
2423 *valp = 1L;
2424 error = 0;
2425 break;
2426 default:
2427 error = fs_pathconf(vp, cmd, valp, cr, ct);
2428 }
2429 return (error);
2430 }
2431
2432
2433 struct vnodeops *tmp_vnodeops;
2434
2435 const fs_operation_def_t tmp_vnodeops_template[] = {
2436 VOPNAME_OPEN, { .vop_open = tmp_open },
2437 VOPNAME_CLOSE, { .vop_close = tmp_close },
2438 VOPNAME_READ, { .vop_read = tmp_read },
2439 VOPNAME_WRITE, { .vop_write = tmp_write },
2440 VOPNAME_IOCTL, { .vop_ioctl = tmp_ioctl },
2441 VOPNAME_GETATTR, { .vop_getattr = tmp_getattr },
2442 VOPNAME_SETATTR, { .vop_setattr = tmp_setattr },
2443 VOPNAME_ACCESS, { .vop_access = tmp_access },
2444 VOPNAME_LOOKUP, { .vop_lookup = tmp_lookup },
2445 VOPNAME_CREATE, { .vop_create = tmp_create },
2446 VOPNAME_REMOVE, { .vop_remove = tmp_remove },
2447 VOPNAME_LINK, { .vop_link = tmp_link },
2448 VOPNAME_RENAME, { .vop_rename = tmp_rename },
2449 VOPNAME_MKDIR, { .vop_mkdir = tmp_mkdir },
2450 VOPNAME_RMDIR, { .vop_rmdir = tmp_rmdir },
2451 VOPNAME_READDIR, { .vop_readdir = tmp_readdir },
2452 VOPNAME_SYMLINK, { .vop_symlink = tmp_symlink },
2453 VOPNAME_READLINK, { .vop_readlink = tmp_readlink },
2454 VOPNAME_FSYNC, { .vop_fsync = tmp_fsync },
2455 VOPNAME_INACTIVE, { .vop_inactive = tmp_inactive },
2456 VOPNAME_FID, { .vop_fid = tmp_fid },
2457 VOPNAME_RWLOCK, { .vop_rwlock = tmp_rwlock },
2458 VOPNAME_RWUNLOCK, { .vop_rwunlock = tmp_rwunlock },
2459 VOPNAME_SEEK, { .vop_seek = tmp_seek },
2460 VOPNAME_SPACE, { .vop_space = tmp_space },
2461 VOPNAME_GETPAGE, { .vop_getpage = tmp_getpage },
2462 VOPNAME_PUTPAGE, { .vop_putpage = tmp_putpage },
2463 VOPNAME_MAP, { .vop_map = tmp_map },
2464 VOPNAME_ADDMAP, { .vop_addmap = tmp_addmap },
2465 VOPNAME_DELMAP, { .vop_delmap = tmp_delmap },
2466 VOPNAME_PATHCONF, { .vop_pathconf = tmp_pathconf },
2467 VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support },
2468 NULL, NULL
2469 };
|
2416 case _PC_SATTR_EXISTS:
2417 *valp = vfs_has_feature(vp->v_vfsp, VFSFT_SYSATTR_VIEWS) &&
2418 (vp->v_type == VREG || vp->v_type == VDIR);
2419 error = 0;
2420 break;
2421 case _PC_TIMESTAMP_RESOLUTION:
2422 /* nanosecond timestamp resolution */
2423 *valp = 1L;
2424 error = 0;
2425 break;
2426 default:
2427 error = fs_pathconf(vp, cmd, valp, cr, ct);
2428 }
2429 return (error);
2430 }
2431
2432
2433 struct vnodeops *tmp_vnodeops;
2434
2435 const fs_operation_def_t tmp_vnodeops_template[] = {
2436 { VOPNAME_OPEN, { .vop_open = tmp_open } },
2437 { VOPNAME_CLOSE, { .vop_close = tmp_close } },
2438 { VOPNAME_READ, { .vop_read = tmp_read } },
2439 { VOPNAME_WRITE, { .vop_write = tmp_write } },
2440 { VOPNAME_IOCTL, { .vop_ioctl = tmp_ioctl } },
2441 { VOPNAME_GETATTR, { .vop_getattr = tmp_getattr } },
2442 { VOPNAME_SETATTR, { .vop_setattr = tmp_setattr } },
2443 { VOPNAME_ACCESS, { .vop_access = tmp_access } },
2444 { VOPNAME_LOOKUP, { .vop_lookup = tmp_lookup } },
2445 { VOPNAME_CREATE, { .vop_create = tmp_create } },
2446 { VOPNAME_REMOVE, { .vop_remove = tmp_remove } },
2447 { VOPNAME_LINK, { .vop_link = tmp_link } },
2448 { VOPNAME_RENAME, { .vop_rename = tmp_rename } },
2449 { VOPNAME_MKDIR, { .vop_mkdir = tmp_mkdir } },
2450 { VOPNAME_RMDIR, { .vop_rmdir = tmp_rmdir } },
2451 { VOPNAME_READDIR, { .vop_readdir = tmp_readdir } },
2452 { VOPNAME_SYMLINK, { .vop_symlink = tmp_symlink } },
2453 { VOPNAME_READLINK, { .vop_readlink = tmp_readlink } },
2454 { VOPNAME_FSYNC, { .vop_fsync = tmp_fsync } },
2455 { VOPNAME_INACTIVE, { .vop_inactive = tmp_inactive } },
2456 { VOPNAME_FID, { .vop_fid = tmp_fid } },
2457 { VOPNAME_RWLOCK, { .vop_rwlock = tmp_rwlock } },
2458 { VOPNAME_RWUNLOCK, { .vop_rwunlock = tmp_rwunlock } },
2459 { VOPNAME_SEEK, { .vop_seek = tmp_seek } },
2460 { VOPNAME_SPACE, { .vop_space = tmp_space } },
2461 { VOPNAME_GETPAGE, { .vop_getpage = tmp_getpage } },
2462 { VOPNAME_PUTPAGE, { .vop_putpage = tmp_putpage } },
2463 { VOPNAME_MAP, { .vop_map = tmp_map } },
2464 { VOPNAME_ADDMAP, { .vop_addmap = tmp_addmap } },
2465 { VOPNAME_DELMAP, { .vop_delmap = tmp_delmap } },
2466 { VOPNAME_PATHCONF, { .vop_pathconf = tmp_pathconf } },
2467 { VOPNAME_VNEVENT, { .vop_vnevent = fs_vnevent_support } },
2468 { NULL, { NULL } }
2469 };
|