Lines Matching defs:mode
101 * @mode: open mode
103 * The @mode parameter specifies if the volume should be opened in read-only
104 * mode, read-write mode, or exclusive mode. The exclusive mode guarantees that
115 struct ubi_volume_desc *ubi_open_volume(int ubi_num, int vol_id, int mode)
122 dbg_gen("open device %d, volume %d, mode %d", ubi_num, vol_id, mode);
127 if (mode != UBI_READONLY && mode != UBI_READWRITE &&
128 mode != UBI_EXCLUSIVE && mode != UBI_METAONLY)
159 switch (mode) {
190 desc->mode = mode;
229 * @mode: open mode
234 int mode)
240 dbg_gen("open device %d, volume %s, mode %d", ubi_num, name, mode);
269 ret = ubi_open_volume(ubi_num, vol_id, mode);
285 * @mode: open mode
290 struct ubi_volume_desc *ubi_open_volume_path(const char *pathname, int mode)
296 dbg_gen("open volume %s, mode %d", pathname, mode);
310 if (!S_ISCHR(stat.mode))
317 return ubi_open_volume(ubi_num, vol_id, mode);
331 dbg_gen("close device %d, volume %d, mode %d",
332 ubi->ubi_num, vol->vol_id, desc->mode);
335 switch (desc->mode) {
526 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)
571 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)
608 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)
668 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)
704 if (desc->mode == UBI_READONLY || vol->vol_type == UBI_STATIC_VOLUME)