Re: Getting LibRaw1394 2.0.0 to Use the New Firewire Subsystem ("JuJu")
Brought to you by:
aeb,
bencollins
From: Irv E. <el...@wl...> - 2008-08-31 14:08:55
|
Stefan Richter wrote: > Irv Elshoff wrote: > >> It would be nice in my opinion to be able to distinguish a true lack of >> devices from an error condition (the ioctl could also fail) ... > > Varying (i.e. device type dependent) permissions are a valid scenario. > ... But if permission to one of the device files > is denied, libraw1394 cannot know if this is something of which the > application client needs to be notified. Error handling (and recovery) is one of most difficult issues in software design and implementation. C++ has exceptions, which would help ease the problem. Unfortunately, C++ is not widely used for base-level libraries like LibRaw1394, perhaps for good reasons. In C there are only two possibilities: propagated return codes or error setting and querying functions using (thread) static memory. > This is just > one of the points that show that the raw1394 ABI and the libraw1394 API > are in parts lower-level than the fw-cdev ABI. > . > To complicate matters, device file ownership/ permissions/ ACLs are > distribution dependent. I therefore can't submit a unified permissions > ruleset ... A diagnostic program like testlibraw should IMHO provide as much information as possible to the user. A simple subroutine that's called before the creation of a handle and scans devices like scan_devices does and reports errors could be enough. I think scan_devices can serve both purposes. I'm willing to submit an implementation if the key people (Stefan, Dan and others) agree to this approach. Further discussion should probably be moved to the developers list. I'd propose closing this linux1394-user thread. Cheers, Irv. |