* open.
*/
struct fs_handle *fd_tracker_open_fs_handle(struct fd_tracker *tracker,
- const char *path, int flags, mode_t *mode);
+ const char *path,
+ int flags,
+ mode_t *mode);
/*
* Open a tracked unsuspendable file descriptor.
* accomodate the request for a new unsuspendable entry.
*/
int fd_tracker_open_unsuspendable_fd(struct fd_tracker *tracker,
- int *out_fds, const char **names, unsigned int fd_count,
- fd_open_cb open, void *data);
+ int *out_fds,
+ const char **names,
+ unsigned int fd_count,
+ fd_open_cb open,
+ void *data);
/*
* Close a tracked unsuspendable file descriptor.
* allows the user to know which file descriptors are no longer being tracked.
*/
int fd_tracker_close_unsuspendable_fd(struct fd_tracker *tracker,
- int *fds, unsigned int fd_count, fd_close_cb close,
+ int *fds,
+ unsigned int fd_count,
+ fd_close_cb close,
void *data);
/*
*/
void fs_handle_put_fd(struct fs_handle *handle);
+/*
+ * Unlink the file associated to an fs_handle. Note that the unlink
+ * operation will not be performed immediately. It will only be performed
+ * once all references to the underlying file (through other fs_handle objects)
+ * have been released.
+ *
+ * However, note that the file will be renamed so as to provide the observable
+ * effect of an unlink(), that is removing a name from the filesystem.
+ *
+ * Returns 0 on success, otherwise a negative value will be returned
+ * if the operation failed.
+ */
+int fs_handle_unlink(struct fs_handle *handle);
+
/*
* Frees the handle and discards the underlying fd.
*/