mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* why UBI static volumes are flagged as DEVFS_IS_CHARACTER_DEV
@ 2016-10-05 13:23 iw3gtf
  2016-10-06  8:17 ` Teresa Remmet
  2016-10-06  9:20 ` Aw: " iw3gtf
  0 siblings, 2 replies; 5+ messages in thread
From: iw3gtf @ 2016-10-05 13:23 UTC (permalink / raw)
  To: barebox

Hi,

I noticed that the commit id c087e0804f0290e9886899e8a3cccb07c4ce088b flagged static
UBI volumes as DEVFS_IS_CHARACTER_DEV.

A consequence of this flag is that commands like:

# cp /dev/nand0.ubi_volumes.ubi.my_static_vol file

will not work because the cp command will see a src file (the static UBI volume) with a size
of -1 (FILE_SIZE_STREAM) and keep on reading from the volume until a flood of
"UBI assert failed in ubi_eba_read_leb at 359" asserts comes out of the console.

I tried to comment out the flag assignment, just to see what happen:

int ubi_volume_cdev_add(struct ubi_device *ubi, struct ubi_volume *vol)
{
...
	cdev->size = vol->used_bytes;

//	if (vol->vol_type == UBI_STATIC_VOLUME)
//		cdev->flags = DEVFS_IS_CHARACTER_DEV;

	cdev->dev = &vol->dev;
...

and then the cp command worked than as expected.

Could someone shortly confirm that the DEVFS_IS_CHARACTER_DEV flag for static UBI volumes
is really needed (to avoid some other problems that my superficial test does not triggers) ?

giorgio


Giorgio, iw3gtf@arcor.de

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-10  8:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-05 13:23 why UBI static volumes are flagged as DEVFS_IS_CHARACTER_DEV iw3gtf
2016-10-06  8:17 ` Teresa Remmet
2016-10-07  7:27   ` Sascha Hauer
2016-10-10  8:17     ` Teresa Remmet
2016-10-06  9:20 ` Aw: " iw3gtf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox