fs-wrapper.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  1. /* fs.defs wrapper code.
  2. Copyright (C) 2008 Free Software Foundation, Inc.
  3. Written by FlÃvio Cruz <flaviocruz@gmail.com>
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License as
  6. published by the Free Software Foundation; either version 2, or (at
  7. your option) any later version.
  8. This program is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
  15. #include <mach/boolean.h>
  16. #include <mach/kern_return.h>
  17. #include <mach/message.h>
  18. #include <mach/mig_errors.h>
  19. #include <mach/mig_support.h>
  20. #include <mach/std_types.h>
  21. #include <mach/mach_types.h>
  22. #include <device/device_types.h>
  23. #include <device/net_status.h>
  24. #include <sys/types.h>
  25. #include <sys/stat.h>
  26. #include <sys/statfs.h>
  27. #include <sys/resource.h>
  28. #include <sys/utsname.h>
  29. #include <hurd/hurd_types.h>
  30. #include <stdio.h>
  31. #include <assert.h>
  32. #include "fs-wrapper.h"
  33. /* this is NULL initialized */
  34. static void *routines[_NUMBER_OF_ROUTINES];
  35. /* function wrappers follows... */
  36. /* file exec */
  37. typedef kern_return_t (*file_exec_type) (file_t,
  38. mach_port_t, int,
  39. data_t, mach_msg_type_number_t,
  40. data_t, mach_msg_type_number_t,
  41. portarray_t, mach_msg_type_number_t,
  42. portarray_t, mach_msg_type_number_t,
  43. intarray_t, mach_msg_type_number_t,
  44. mach_port_array_t,
  45. mach_msg_type_number_t,
  46. mach_port_array_t,
  47. mach_msg_type_number_t);
  48. kern_return_t
  49. lisp_S_file_exec (file_t exec_file,
  50. mach_port_t exec_task,
  51. int flags,
  52. data_t argv,
  53. mach_msg_type_number_t argvCnt,
  54. data_t envp,
  55. mach_msg_type_number_t envpCnt,
  56. portarray_t fdarray,
  57. mach_msg_type_number_t fdarrayCnt,
  58. portarray_t portarray,
  59. mach_msg_type_number_t portarrayCnt,
  60. intarray_t intarray,
  61. mach_msg_type_number_t intarrayCnt,
  62. mach_port_array_t deallocnames,
  63. mach_msg_type_number_t deallocnamesCnt,
  64. mach_port_array_t destroynames,
  65. mach_msg_type_number_t destroynamesCnt)
  66. {
  67. if (routines[FILE_EXEC] == NULL)
  68. {
  69. return EOPNOTSUPP;
  70. }
  71. file_exec_type exec_routine = routines[FILE_EXEC];
  72. return exec_routine (exec_file, exec_task, flags,
  73. argv, argvCnt, envp,
  74. envpCnt, fdarray, fdarrayCnt,
  75. portarray, portarrayCnt,
  76. intarray, intarrayCnt,
  77. deallocnames, deallocnamesCnt,
  78. destroynames, destroynamesCnt);
  79. }
  80. /* file chown */
  81. typedef kern_return_t (*file_chown_type) (file_t chown_file,
  82. uid_t new_owner, gid_t new_group);
  83. kern_return_t
  84. lisp_S_file_chown (file_t chown_file, uid_t new_owner, gid_t new_group)
  85. {
  86. if (routines[FILE_CHOWN] == NULL)
  87. {
  88. return EOPNOTSUPP;
  89. }
  90. file_chown_type chown_routine = routines[FILE_CHOWN];
  91. return chown_routine (chown_file, new_owner, new_group);
  92. }
  93. /* file chauthor */
  94. typedef kern_return_t (*file_chauthor_type) (file_t, uid_t);
  95. kern_return_t
  96. lisp_S_file_chauthor (file_t chauth_file, uid_t new_author)
  97. {
  98. if (routines[FILE_CHAUTHOR] == NULL)
  99. {
  100. return EOPNOTSUPP;
  101. }
  102. file_chauthor_type chauthor_routine = routines[FILE_CHAUTHOR];
  103. return chauthor_routine (chauth_file, new_author);
  104. }
  105. /* file chmod */
  106. typedef kern_return_t (*file_chmod_type) (file_t, mode_t);
  107. kern_return_t
  108. lisp_S_file_chmod (file_t chmod_file, mode_t new_mode)
  109. {
  110. if (routines[FILE_CHMOD] == NULL)
  111. {
  112. return EOPNOTSUPP;
  113. }
  114. file_chmod_type chmod_routine = routines[FILE_CHMOD];
  115. return chmod_routine (chmod_file, new_mode);
  116. }
  117. /* file chflags */
  118. typedef kern_return_t (*file_chflags_type) (file_t, int);
  119. kern_return_t
  120. lisp_S_file_chflags (file_t chflags_file, int new_flags)
  121. {
  122. if (routines[FILE_CHFLAGS] == NULL)
  123. {
  124. return EOPNOTSUPP;
  125. }
  126. file_chflags_type chflags_routine = routines[FILE_CHFLAGS];
  127. return chflags_routine (chflags_file, new_flags);
  128. }
  129. /* file utimes */
  130. typedef kern_return_t (*file_utimes_type) (file_t,
  131. time_value_t *, time_value_t *);
  132. kern_return_t
  133. lisp_S_file_utimes (file_t utimes_file,
  134. time_value_t new_atime, time_value_t new_mtime)
  135. {
  136. if (routines[FILE_UTIMES] == NULL)
  137. {
  138. return EOPNOTSUPP;
  139. }
  140. file_utimes_type utimes_routine = routines[FILE_UTIMES];
  141. // easier in lisp to just pass pointers
  142. return utimes_routine (utimes_file, &new_atime, &new_mtime);
  143. }
  144. /* file set size */
  145. typedef kern_return_t (*file_set_size_type) (file_t, int);
  146. kern_return_t
  147. lisp_S_file_set_size (file_t trunc_file, loff_t new_size)
  148. {
  149. if (routines[FILE_SET_SIZE] == NULL)
  150. {
  151. return EOPNOTSUPP;
  152. }
  153. file_set_size_type set_size_routine = routines[FILE_SET_SIZE];
  154. return set_size_routine (trunc_file, (int)new_size);
  155. }
  156. /* file lock */
  157. typedef kern_return_t (*file_lock_type) (file_t, int);
  158. kern_return_t
  159. lisp_S_file_lock (file_t lock_file, int flags)
  160. {
  161. if (routines[FILE_LOCK] == NULL)
  162. {
  163. return EOPNOTSUPP;
  164. }
  165. file_lock_type lock_routine = routines[FILE_LOCK];
  166. return lock_routine (lock_file, flags);
  167. }
  168. /* file lock stat */
  169. typedef kern_return_t (*file_lock_stat_type) (file_t, int *, int *);
  170. kern_return_t
  171. lisp_S_file_lock_stat (file_t lock_file, int *mystatus, int *otherstatus)
  172. {
  173. if (routines[FILE_LOCK_STAT] == NULL)
  174. {
  175. return EOPNOTSUPP;
  176. }
  177. file_lock_stat_type lock_stat_routine = routines[FILE_LOCK_STAT];
  178. return lock_stat_routine (lock_file, mystatus, otherstatus);
  179. }
  180. /* file check access */
  181. typedef kern_return_t (*file_check_access_type) (file_t, int *);
  182. kern_return_t
  183. lisp_S_file_check_access (file_t file, int *allowed)
  184. {
  185. if (routines[FILE_CHECK_ACCESS] == NULL)
  186. {
  187. return EOPNOTSUPP;
  188. }
  189. file_check_access_type check_access_routine = routines[FILE_CHECK_ACCESS];
  190. return check_access_routine (file, allowed);
  191. }
  192. /* file notice changes */
  193. typedef kern_return_t (*file_notice_changes_type) (file_t, mach_port_t);
  194. kern_return_t
  195. lisp_S_file_notice_changes (file_t file, mach_port_t port)
  196. {
  197. if (routines[FILE_NOTICE_CHANGES] == NULL)
  198. {
  199. return EOPNOTSUPP;
  200. }
  201. file_notice_changes_type notice_changes_routine =
  202. routines[FILE_NOTICE_CHANGES];
  203. return notice_changes_routine (file, port);
  204. }
  205. /* file getcontrol */
  206. typedef kern_return_t (*file_getcontrol_type) (file_t,
  207. mach_port_t *,
  208. mach_msg_type_name_t *);
  209. kern_return_t
  210. lisp_S_file_getcontrol (file_t file,
  211. mach_port_t * control,
  212. mach_msg_type_name_t * controlPoly)
  213. {
  214. if (routines[FILE_GETCONTROL] == NULL)
  215. {
  216. return EOPNOTSUPP;
  217. }
  218. file_getcontrol_type getcontrol_routine = routines[FILE_GETCONTROL];
  219. return getcontrol_routine (file, control, controlPoly);
  220. }
  221. /* file statfs */
  222. typedef kern_return_t (*file_statfs_type) (file_t, fsys_statfsbuf_t *);
  223. kern_return_t
  224. lisp_S_file_statfs (file_t file, fsys_statfsbuf_t * info)
  225. {
  226. if (routines[FILE_STATFS] == NULL)
  227. {
  228. return EOPNOTSUPP;
  229. }
  230. file_statfs_type statfs_routine = routines[FILE_STATFS];
  231. return statfs_routine (file, info);
  232. }
  233. /* file sync */
  234. typedef kern_return_t (*file_sync_type) (file_t, int, int);
  235. kern_return_t
  236. lisp_S_file_sync (file_t file, int wait, int omit_metadata)
  237. {
  238. if (routines[FILE_SYNC] == NULL)
  239. {
  240. return EOPNOTSUPP;
  241. }
  242. file_sync_type sync_routine = routines[FILE_SYNC];
  243. return sync_routine (file, wait, omit_metadata);
  244. }
  245. /* file syncfs */
  246. typedef kern_return_t (*file_syncfs_type) (file_t, int, int);
  247. kern_return_t
  248. lisp_S_file_syncfs (file_t file, int wait, int do_children)
  249. {
  250. if (routines[FILE_SYNCFS] == NULL)
  251. {
  252. return EOPNOTSUPP;
  253. }
  254. file_syncfs_type syncfs_routine = routines[FILE_SYNCFS];
  255. return syncfs_routine (file, wait, do_children);
  256. }
  257. /* file get storage info */
  258. typedef kern_return_t (*file_get_storage_info_type) (file_t,
  259. portarray_t *,
  260. mach_msg_type_name_t *,
  261. mach_msg_type_number_t *,
  262. intarray_t *,
  263. mach_msg_type_number_t *,
  264. off_array_t *,
  265. mach_msg_type_number_t *,
  266. data_t *,
  267. mach_msg_type_number_t
  268. *);
  269. kern_return_t
  270. lisp_S_file_get_storage_info (file_t file,
  271. portarray_t * ports,
  272. mach_msg_type_name_t * portsPoly,
  273. mach_msg_type_number_t * portsCnt,
  274. intarray_t * ints,
  275. mach_msg_type_number_t * intsCnt,
  276. off_array_t * offsets,
  277. mach_msg_type_number_t * offsetsCnt,
  278. data_t * data, mach_msg_type_number_t * dataCnt)
  279. {
  280. if (routines[FILE_GET_STORAGE_INFO] == NULL)
  281. {
  282. return EOPNOTSUPP;
  283. }
  284. file_get_storage_info_type get_storage_info_routine =
  285. routines[FILE_GET_STORAGE_INFO];
  286. return get_storage_info_routine (file, ports,
  287. portsPoly, portsCnt, ints, intsCnt,
  288. offsets, offsetsCnt, data, dataCnt);
  289. }
  290. /* file getlinknode */
  291. typedef kern_return_t (*file_getlinknode_type) (file_t,
  292. mach_port_t *,
  293. mach_msg_type_name_t *);
  294. kern_return_t
  295. lisp_S_file_getlinknode (file_t file,
  296. mach_port_t * linknode,
  297. mach_msg_type_name_t * linknodePoly)
  298. {
  299. if (routines[FILE_GETLINKNODE] == NULL)
  300. {
  301. return EOPNOTSUPP;
  302. }
  303. file_getlinknode_type getlinknode_routine = routines[FILE_GETLINKNODE];
  304. return getlinknode_routine (file, linknode, linknodePoly);
  305. }
  306. /* file getfh */
  307. typedef kern_return_t (*file_getfh_type) (file_t,
  308. data_t *, mach_msg_type_number_t *);
  309. kern_return_t
  310. lisp_S_file_getfh (file_t file,
  311. data_t * filehandle, mach_msg_type_number_t * filehandleCnt)
  312. {
  313. if (routines[FILE_GETFH] == NULL)
  314. {
  315. return EOPNOTSUPP;
  316. }
  317. file_getfh_type getfh_routine = routines[FILE_GETFH];
  318. return getfh_routine (file, filehandle, filehandleCnt);
  319. }
  320. /* dir lookup */
  321. typedef kern_return_t (*dir_lookup_type) (file_t,
  322. string_t, int,
  323. mode_t, retry_type *,
  324. string_t, mach_port_t *,
  325. mach_msg_type_name_t *);
  326. kern_return_t
  327. lisp_S_dir_lookup (file_t startdir,
  328. string_t filename,
  329. int flags,
  330. mode_t mode,
  331. retry_type * do_retry,
  332. string_t retry_name,
  333. mach_port_t * result, mach_msg_type_name_t * resultPoly)
  334. {
  335. if (routines[DIR_LOOKUP] == NULL)
  336. {
  337. return EOPNOTSUPP;
  338. }
  339. dir_lookup_type lookup_routine = routines[DIR_LOOKUP];
  340. return lookup_routine (startdir, filename,
  341. flags, mode, do_retry, retry_name,
  342. result, resultPoly);
  343. }
  344. /* dir readdir */
  345. typedef kern_return_t (*dir_readdir_type) (file_t,
  346. data_t *, mach_msg_type_number_t *,
  347. boolean_t *, int,
  348. int, vm_size_t, int *);
  349. kern_return_t
  350. lisp_S_dir_readdir (file_t dir,
  351. data_t * data,
  352. mach_msg_type_number_t * dataCnt,
  353. boolean_t * dataDealloc,
  354. int entry, int nentries, vm_size_t bufsiz, int *amount)
  355. {
  356. if (routines[DIR_READDIR] == NULL)
  357. {
  358. return EOPNOTSUPP;
  359. }
  360. dir_readdir_type readdir_routine = routines[DIR_READDIR];
  361. return readdir_routine (dir, data, dataCnt,
  362. dataDealloc, entry, nentries, bufsiz, amount);
  363. }
  364. /* dir mkdir */
  365. typedef kern_return_t (*dir_mkdir_type) (file_t, string_t, mode_t);
  366. kern_return_t
  367. lisp_S_dir_mkdir (file_t directory, string_t name, mode_t mode)
  368. {
  369. if (routines[DIR_MKDIR] == NULL)
  370. {
  371. return EOPNOTSUPP;
  372. }
  373. dir_mkdir_type mkdir_routine = routines[DIR_MKDIR];
  374. return mkdir_routine (directory, name, mode);
  375. }
  376. /* dir rmdir */
  377. typedef kern_return_t (*dir_rmdir_type) (file_t, string_t);
  378. kern_return_t
  379. lisp_S_dir_rmdir (file_t directory, string_t name)
  380. {
  381. if (routines[DIR_RMDIR] == NULL)
  382. {
  383. return EOPNOTSUPP;
  384. }
  385. dir_rmdir_type rmdir_routine = routines[DIR_RMDIR];
  386. return rmdir_routine (directory, name);
  387. }
  388. /* dir unlink */
  389. typedef kern_return_t (*dir_unlink_type) (file_t, string_t);
  390. kern_return_t
  391. lisp_S_dir_unlink (file_t directory, string_t name)
  392. {
  393. if (routines[DIR_UNLINK] == NULL)
  394. {
  395. return EOPNOTSUPP;
  396. }
  397. dir_unlink_type unlink_routine = routines[DIR_UNLINK];
  398. return unlink_routine (directory, name);
  399. }
  400. /* dir link */
  401. typedef kern_return_t (*dir_link_type) (file_t, file_t, string_t, int);
  402. kern_return_t
  403. lisp_S_dir_link (file_t dir, file_t file, string_t name, int excl)
  404. {
  405. if (routines[DIR_LINK] == NULL)
  406. {
  407. return EOPNOTSUPP;
  408. }
  409. dir_link_type link_routine = routines[DIR_LINK];
  410. return link_routine (dir, file, name, excl);
  411. }
  412. /* dir rename */
  413. typedef kern_return_t (*dir_rename_type) (file_t,
  414. string_t, file_t, string_t, int);
  415. kern_return_t
  416. lisp_S_dir_rename (file_t olddirectory,
  417. string_t oldname,
  418. file_t newdirectory, string_t newname, int excl)
  419. {
  420. if (routines[DIR_RENAME] == NULL)
  421. {
  422. return EOPNOTSUPP;
  423. }
  424. dir_rename_type rename_routine = routines[DIR_RENAME];
  425. return rename_routine (olddirectory, oldname, newdirectory, newname, excl);
  426. }
  427. /* dir mkfile */
  428. typedef kern_return_t (*dir_mkfile_type) (file_t,
  429. int, mode_t, mach_port_t *,
  430. mach_msg_type_name_t *);
  431. kern_return_t
  432. lisp_S_dir_mkfile (file_t directory,
  433. int flags,
  434. mode_t mode,
  435. mach_port_t * newnode, mach_msg_type_name_t * newnodePoly)
  436. {
  437. if (routines[DIR_MKFILE] == NULL)
  438. {
  439. return EOPNOTSUPP;
  440. }
  441. dir_mkfile_type mkfile_routine = routines[DIR_MKFILE];
  442. return mkfile_routine (directory, flags, mode, newnode, newnodePoly);
  443. }
  444. /* dir notice changes */
  445. typedef kern_return_t (*dir_notice_changes_type) (file_t, mach_port_t);
  446. kern_return_t
  447. lisp_S_dir_notice_changes (file_t directory, mach_port_t port)
  448. {
  449. if (routines[DIR_NOTICE_CHANGES] == NULL)
  450. {
  451. return EOPNOTSUPP;
  452. }
  453. dir_notice_changes_type notice_changes_routine =
  454. routines[DIR_NOTICE_CHANGES];
  455. return notice_changes_routine (directory, port);
  456. }
  457. /* file set translator */
  458. typedef kern_return_t (*file_set_translator_type) (file_t,
  459. int, int, int,
  460. data_t,
  461. mach_msg_type_number_t,
  462. mach_port_t);
  463. kern_return_t
  464. lisp_S_file_set_translator (file_t file,
  465. int passive_flags,
  466. int active_flags,
  467. int oldtrans_flags,
  468. data_t passive,
  469. mach_msg_type_number_t passiveCnt,
  470. mach_port_t active)
  471. {
  472. if (routines[FILE_SET_TRANSLATOR] == NULL)
  473. {
  474. return EOPNOTSUPP;
  475. }
  476. file_set_translator_type set_translator_routine =
  477. routines[FILE_SET_TRANSLATOR];
  478. return set_translator_routine (file, passive_flags,
  479. active_flags, oldtrans_flags,
  480. passive, passiveCnt, active);
  481. }
  482. /* file get translator */
  483. typedef kern_return_t (*file_get_translator_type) (file_t,
  484. data_t *,
  485. mach_msg_type_number_t *);
  486. kern_return_t
  487. lisp_S_file_get_translator (file_t file,
  488. data_t * translator,
  489. mach_msg_type_number_t * translatorCnt)
  490. {
  491. if (routines[FILE_GET_TRANSLATOR] == NULL)
  492. {
  493. return EOPNOTSUPP;
  494. }
  495. file_get_translator_type get_translator_routine =
  496. routines[FILE_GET_TRANSLATOR];
  497. return get_translator_routine (file, translator, translatorCnt);
  498. }
  499. /* file get translator cntl */
  500. typedef kern_return_t (*file_get_translator_cntl_type) (file_t,
  501. mach_port_t *,
  502. mach_msg_type_name_t
  503. *);
  504. kern_return_t
  505. lisp_S_file_get_translator_cntl (file_t file,
  506. mach_port_t * translator_cntl,
  507. mach_msg_type_name_t * translator_cntlPoly)
  508. {
  509. if (routines[FILE_GET_TRANSLATOR_CNTL] == NULL)
  510. {
  511. return EOPNOTSUPP;
  512. }
  513. file_get_translator_cntl_type get_translator_cntl_routine =
  514. routines[FILE_GET_TRANSLATOR_CNTL];
  515. return get_translator_cntl_routine (file, translator_cntl,
  516. translator_cntlPoly);
  517. }
  518. /* file get fs options */
  519. typedef kern_return_t (*file_get_fs_options_type) (file_t,
  520. data_t *,
  521. mach_msg_type_number_t *);
  522. kern_return_t
  523. lisp_S_file_get_fs_options (file_t file,
  524. data_t * options,
  525. mach_msg_type_number_t * optionsCnt)
  526. {
  527. if (routines[FILE_GET_FS_OPTIONS] == NULL)
  528. {
  529. return EOPNOTSUPP;
  530. }
  531. file_get_fs_options_type get_fs_options_routine =
  532. routines[FILE_GET_FS_OPTIONS];
  533. return get_fs_options_routine (file, options, optionsCnt);
  534. }
  535. /* file reparent */
  536. typedef kern_return_t (*file_reparent_type) (file_t,
  537. mach_port_t, mach_port_t *,
  538. mach_msg_type_name_t *);
  539. kern_return_t
  540. lisp_S_file_reparent (file_t file,
  541. mach_port_t parent,
  542. mach_port_t * newfile,
  543. mach_msg_type_name_t * new_filePoly)
  544. {
  545. if (routines[FILE_REPARENT] == NULL)
  546. {
  547. return EOPNOTSUPP;
  548. }
  549. file_reparent_type reparent_routine = routines[FILE_REPARENT];
  550. return reparent_routine (file, parent, newfile, new_filePoly);
  551. }
  552. static const char *
  553. routine_to_str (const FsRoutine rot)
  554. {
  555. #define RET(val) case val: return #val ;
  556. switch (rot)
  557. {
  558. RET (FILE_EXEC)
  559. RET (FILE_CHOWN)
  560. RET (FILE_CHAUTHOR)
  561. RET (FILE_CHMOD)
  562. RET (FILE_CHFLAGS)
  563. RET (FILE_UTIMES)
  564. RET (FILE_SET_SIZE)
  565. RET (FILE_LOCK)
  566. RET (FILE_LOCK_STAT)
  567. RET (FILE_CHECK_ACCESS)
  568. RET (FILE_NOTICE_CHANGES)
  569. RET (FILE_GETCONTROL)
  570. RET (FILE_STATFS)
  571. RET (FILE_SYNC)
  572. RET (FILE_SYNCFS)
  573. RET (FILE_GET_STORAGE_INFO)
  574. RET (FILE_GETLINKNODE)
  575. RET (FILE_GETFH)
  576. RET (DIR_LOOKUP)
  577. RET (DIR_READDIR)
  578. RET (DIR_MKDIR)
  579. RET (DIR_RMDIR)
  580. RET (DIR_UNLINK)
  581. RET (DIR_LINK)
  582. RET (DIR_RENAME)
  583. RET (DIR_MKFILE)
  584. RET (DIR_NOTICE_CHANGES)
  585. RET (FILE_SET_TRANSLATOR)
  586. RET (FILE_GET_TRANSLATOR)
  587. RET (FILE_GET_TRANSLATOR_CNTL)
  588. RET (FILE_GET_FS_OPTIONS)
  589. RET (FILE_REPARENT)
  590. case _NUMBER_OF_ROUTINES:
  591. default:
  592. return "";
  593. }
  594. #undef RET
  595. }
  596. #include "common.c"
  597. COMMON_FUNCTIONS (fs);