[ENBD] /proc/nbdinfo

Julien Rennard jrennard at cri74.org
Thu Jan 8 00:39:58 MST 2004


On Wed, 2004-01-07 at 16:37, Peter T. Breuer wrote:
> "Also sprach Peter T. Breuer:"
> > It's "reset=1".

> BTW, you can probably get rid of the "=1" if you change the bit in
> getarg() that says
No, no needs the only problem with echo reset[a]=1 > /proc/nbdinfo is that I
had to know the device is [a] in my scripts reset=1 is perfect (even
better when lots of "impolite" users logs off brutally from their
thinclients...) 
 
>     if (*buffer != '=') {
>         return -1;
>     }
> 
> 
> to
> 
> 
>     if (*buffer != '=') {
>         // no =, assume =1 is intended
>         if (*buffer == '\n' || !*buffer) {
>             *i = 1;
>             return 1;
>         }
>         // if got funny trailing chars, error
>         return -1;
>     }
> 
> and cross your fingers.
> 
> Peter
> _______________________________________________
> ENBD mailing list
> ENBD at lists.community.tummy.com
> http://lists.community.tummy.com/mailman/listinfo/enbd
> 



More information about the ENBD mailing list