Lines Matching full:volume

148 static int ubi_create_vol(char *volume, int64_t size, int dynamic, int vol_id)  in ubi_create_vol()  argument
162 strcpy(req.name, volume); in ubi_create_vol()
163 req.name_len = strlen(volume); in ubi_create_vol()
172 printf("Creating %s volume %s of size %lld\n", in ubi_create_vol()
173 dynamic ? "dynamic" : "static", volume, size); in ubi_create_vol()
174 /* Call real ubi create volume */ in ubi_create_vol()
178 static struct ubi_volume *ubi_find_volume(char *volume) in ubi_find_volume() argument
185 if (vol && !strcmp(vol->name, volume)) in ubi_find_volume()
189 printf("Volume %s not found!\n", volume); in ubi_find_volume()
193 static int ubi_remove_vol(char *volume) in ubi_remove_vol() argument
198 vol = ubi_find_volume(volume); in ubi_remove_vol()
202 printf("Remove UBI volume %s (id %d)\n", vol->name, vol->vol_id); in ubi_remove_vol()
241 ubi_err(ubi, "cannot remove volume %s, error %d", volume, err); in ubi_remove_vol()
247 static int ubi_volume_continue_write(char *volume, void *buf, size_t size) in ubi_volume_continue_write() argument
252 vol = ubi_find_volume(volume); in ubi_volume_continue_write()
270 ubi_warn(ubi, "volume %d on UBI device %d is corrupt", in ubi_volume_continue_write()
282 int ubi_volume_begin_write(char *volume, void *buf, size_t size, in ubi_volume_begin_write() argument
289 vol = ubi_find_volume(volume); in ubi_volume_begin_write()
295 printf("size > volume size! Aborting!\n"); in ubi_volume_begin_write()
301 printf("Cannot start volume update\n"); in ubi_volume_begin_write()
305 return ubi_volume_continue_write(volume, buf, size); in ubi_volume_begin_write()
308 int ubi_volume_write(char *volume, void *buf, size_t size) in ubi_volume_write() argument
310 return ubi_volume_begin_write(volume, buf, size, size); in ubi_volume_write()
313 int ubi_volume_read(char *volume, char *buf, size_t size) in ubi_volume_read() argument
322 vol = ubi_find_volume(volume); in ubi_volume_read()
331 printf("damaged volume, update marker is set"); in ubi_volume_read()
342 printf("Read %zu bytes from volume %s to %p\n", size, volume, buf); in ubi_volume_read()
345 printf("read from corrupted volume %d", vol->vol_id); in ubi_volume_read()
518 printf("Error, no volume name passed\n"); in do_ubi()
523 int dynamic = 1; /* default: dynamic volume */ in do_ubi()
529 /* E.g., create volume size type vol_id */ in do_ubi()
535 /* E.g., create volume size type */ in do_ubi()
545 /* E.g., create volume size */ in do_ubi()
556 /* E.g., create volume */ in do_ubi()
562 /* E.g., remove volume */ in do_ubi()
593 printf("%lld bytes written to volume %s\n", size, in do_ubi()
603 /* E.g., read volume size */ in do_ubi()
609 /* E.g., read volume */ in do_ubi()
633 " - Display volume and ubi layout information\n"
636 "ubi create[vol] volume [size] [type] [id]\n"
637 " - create volume name with size ('-' for maximum"
639 "ubi write[vol] address volume size"
640 " - Write volume from address with size\n"
641 "ubi write.part address volume size [fullsize]\n"
642 " - Write part of a volume from address\n"
643 "ubi read[vol] address volume [size]"
644 " - Read volume to address with size\n"
645 "ubi remove[vol] volume"
646 " - Remove volume\n"
648 " volume: character name\n"