Lines Matching defs:mode
74 * This function checks the validity of a mode.
76 static bool is_valid_mode(int mode)
78 if ((mode & O_READ) && (mode & (O_WRITE | O_RDWR))) {
81 if ((mode & O_WRITE) && (mode & (O_READ | O_RDWR))) {
84 if ((mode & O_RDWR) && (mode & (O_READ | O_WRITE))) {
148 channel->mode = 0;
259 chan_t *path_to_channel(const char *path, int mode)
321 /* TODO: check mode */
363 new_channel->mode = channel->mode;
434 const char *name, long length, qid_t qid, unsigned int mode)
443 dir->mode = mode;
446 dir->mode |= O_DIR;
476 int open(const char *path, int mode)
484 if (is_valid_mode(mode) == false) {
488 channel = path_to_channel(path, mode);