@@ -2251,10 +2251,12 @@ void ad_init(struct adouble *ad, const struct vol *restrict vol)
22512251/*!
22522252 * @brief Open data-, metadata(header)- or resource fork
22532253 *
2254+ * @code
22542255 * ad_open(struct adouble *ad, const char *path, int adflags, int flags)
22552256 * ad_open(struct adouble *ad, const char *path, int adflags, int flags, mode_t mode)
2257+ * @endcode
22562258 *
2257- * You must call ad_init() before ad_open, usually you'll just call it like this: \n
2259+ * You must call ad_init() before ad_open, usually you'll just call it like this:
22582260 * @code
22592261 * struct adoube ad;
22602262 * ad_init(&ad, vol->v_adouble, vol->v_ad_options);
@@ -2264,29 +2266,32 @@ void ad_init(struct adouble *ad, const struct vol *restrict vol)
22642266 *
22652267 * @param ad (rw) pointer to struct adouble
22662268 * @param path (r) Path to file or directory
2267- * @param adflags (r) Flags specifying which fork to open, can be or'd:
2268- * ADFLAGS_DF: open data fork
2269- * ADFLAGS_RF: open resource fork
2270- * ADFLAGS_HF: open header (metadata) file
2271- * ADFLAGS_NOHF: it's not an error if header file couldn't be opened
2272- * ADFLAGS_NORF: it's not an error if reso fork couldn't be opened
2273- * ADFLAGS_DIR: if path is a directory you MUST or ADFLAGS_DIR to adflags
2269+ * @param adflags (r) Flags specifying which fork to open, can be or'd (see below)
2270+ * @param ... (r) mode used with O_CREATE
2271+ *
2272+ * Regular adflags:
2273+ * - ADFLAGS_DF: open data fork
2274+ * - ADFLAGS_RF: open resource fork
2275+ * - ADFLAGS_HF: open header (metadata) file
2276+ * - ADFLAGS_NOHF: it's not an error if header file couldn't be opened
2277+ * - ADFLAGS_NORF: it's not an error if reso fork couldn't be opened
2278+ * - ADFLAGS_DIR: if path is a directory you MUST or ADFLAGS_DIR to adflags
22742279 *
2275- * Access mode for the forks:
2276- * ADFLAGS_RDONLY: open read only
2277- * ADFLAGS_RDWR: open read write
2280+ * Access mode for the forks:
2281+ * - ADFLAGS_RDONLY: open read only
2282+ * - ADFLAGS_RDWR: open read write
22782283 *
2279- * Creation flags:
2280- * ADFLAGS_CREATE: create if not existing
2281- * ADFLAGS_TRUNC: truncate
2284+ * Creation flags:
2285+ * - ADFLAGS_CREATE: create if not existing
2286+ * - ADFLAGS_TRUNC: truncate
22822287 *
2283- * Special flags:
2284- * ADFLAGS_CHECK_OF: check for open forks from us and other afpd's
2285- * ADFLAGS_SETSHRMD: this adouble struct will be used to set sharemode locks.
2286- * This basically results in the files being opened RW instead of RDONLY.
2287- * @param ... (r) mode used with O_CREATE
2288+ * Special flags:
2289+ * - ADFLAGS_CHECK_OF: check for open forks from us and other afpd's
2290+ * - ADFLAGS_SETSHRMD: this adouble struct will be used to set sharemode locks.
2291+ * This basically results in the files being opened RW instead of RDONLY.
22882292 *
22892293 * The open mode flags (rw vs ro) have to take into account all the following requirements:
2294+ *
22902295 * - we remember open fds for files because me must avoid a single close releasing fcntl locks for other
22912296 * fds of the same file
22922297 *
0 commit comments