Re: [patch] added "df" method to "mount" module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il giorno 26/ago/08, alle ore 16:23, Michael DeHaan ha scritto:
The correct answer is to increase the counter size, my /1024 hack was just to get it running now.
Depends how many significant figures you require.
My opinion is that in 2008 I should be able to count bytes one at a time without problems.

That all being said, Func modules should not be parsing shell commands unless it's a last resort, when it's possible to get data through other libraries, they should use those libraries, and when they can use proc, they should.  Parsing shell commands can be rather fragile.
I'm not using any external process/command/utility and am actually using proc. While this won't be portable on non-linux kernels, it's always better than parsing output from /bin/df or whatever.
Was yours an implicit reference to minion/modules/mount.py:27 ?
Define "implicit" in this context?
It was more or less a joke on the fact that my patch doesn't parse any shell command, while just some lines before the mount.py module does it. English isn't my native language, probably I could have wrote it in a better way.

The lines I'm referring to launch /bin/cat to read /proc/mounts. I changed it to a read-only open(), I think you too would prefer it this way. Patch follows.

Attachment: func-mount_list.diff
Description: Binary data


--
Luca Lesinigo
_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list

[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux