Hi Vivek,

> I am adding some useful options to touch command:
> 
> -a, --access-time    Change only the access time
> -c, --no-create        Do not create new files
> -m, --mod-time       Change only the modification time
This might be a problem. I don't think that *time attributes are supported in 
HelenOS at all at the moment. Access time will almost certainly never be 
implemented because it's a bad thing(TM).

> Adding -c option was pretty easy. Now, i am having problem in adding -a and
> -m options.
I can imagine.

> The struct stat is defined as following:
> 
> struct stat {
>     fs_handle_t fs_handle;
>     service_id_t service_id;
>     fs_index_t index;
>     unsigned int lnkcnt;
>     bool is_file;
>     bool is_directory;
>     aoff64_t size;
>     service_id_t service;
> };
> 
> There is no equivalent to st_atime and st_ctime here, and hence the
Exactly.

> I saw
> that there is a 'struct posix_stat' in uspace/lib/posix/sys/stat.h, and
> corresponding posix_stat() and posix_fstat() functions
> in uspace/lib/posix/sys/stat.c. Is this 'struct posix_stat' meant to be
> used in some way ?
These are only for ported applications that make use of out POSIX compatibility 
library that provides a limited level of POSIX-like C library (we use it for 
PCC and GNU binutils). For these posix_xxx gets mapped to xxx via preprocessor 
macros. Nevertheless since the OS does not suport *time attributes, using 
libposix will not help you, it does not have any way of getting these 
attributes now.

Cheers,
Jiri



_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel

Reply via email to