[OpenAFS-devel] php-(a)fs
Alberto Mancini
mancini@math.unifi.it
Fri, 12 Dec 2008 13:03:03 +0100 (CET)
We are considering wrapping just the call to pioctl but the use
of the the ViceIoctl parameter in pioctl is quite, say, c-ish:
e.g. VIOCGETVOLSTAT fills viceioctl.out with struct VolumeStaus
(concatenated with the volume name, actually) and
recovering the data in php seems not-so-polite.
May be we will end with a wrapped pioctl that and a few
opcode-specific ViceIoctl converters to get the data
where required (ACLs are an example where php procssing is
straightforward).
Alberto.
On Thu, 11 Dec 2008, Jeffrey Hutzelman wrote:
> --On Thursday, December 11, 2008 02:56:09 AM +0100 Alberto Mancini
> <mancini@math.unifi.it> wrote:
>
>> Hi,
>> I wrote, mostly to understand the difficulties, a tiny php extension
>> wrapping a couple of pioctl calls.
>>
>> Actually WHEREIS,GETACL,GETVOLSTAT are in the code and I think that
>> writing the extension is less problematic than processing 'fs'
>> output.
>>
>> The code (that is really a quick-and-dirty test) can be downloaded
>> at the URL:
>> http://ununtrio.math.unifi.it/PHP/
>>
>> where a working test (test.php) is available.
>> Most of the code is from fs.c.
>>
>> Any criticism will be apreciated.
>>
>> I'd like to ear ideas on the general layout of the extension (OO ?) and
>> on the "operations" that may be useful to implement.
>
> I wonder if you wouldn't be better off implementing only a thin wrapper
> around pioctl() in C, and doing the operation-specific parts entirely in PHP.
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-devel
>
>