Lines Matching defs:mode
100 * @mode: open mode
102 * The @mode parameter specifies if the volume should be opened in read-only
103 * mode, read-write mode, or exclusive mode. The exclusive mode guarantees that
114 struct ubi_volume_desc *ubi_open_volume(int ubi_num, int vol_id, int mode)
121 dbg_gen("open device %d, volume %d, mode %d", ubi_num, vol_id, mode);
126 if (mode != UBI_READONLY && mode != UBI_READWRITE &&
127 mode != UBI_EXCLUSIVE && mode != UBI_METAONLY)
158 switch (mode) {
189 desc->mode = mode;
228 * @mode: open mode
233 int mode)
239 dbg_gen("open device %d, volume %s, mode %d", ubi_num, name, mode);
268 ret = ubi_open_volume(ubi_num, vol_id, mode);
284 * @mode: open mode
289 struct ubi_volume_desc *ubi_open_volume_path(const char *pathname, int mode)
295 dbg_gen("open volume %s, mode %d", pathname, mode);
309 if (!S_ISCHR(stat.mode))
316 return ubi_open_volume(ubi_num, vol_id, mode);
330 dbg_gen("close device %d, volume %d, mode %d",
331 ubi->ubi_num, vol->vol_id, desc->mode);
334 switch (desc->mode) {
525 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)
570 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)
607 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)
667 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)
703 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)