diff options
author | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-12-19 13:21:24 +0000 |
---|---|---|
committer | nima <nima@abc39116-655e-4be6-ad55-d661dc543056> | 2008-12-19 13:21:24 +0000 |
commit | 11ec71fe19b72a35612fa52cef5c25760e487d7d (patch) | |
tree | 51908a8cb1ea1d89a32284c73fcc9e035062c37b /src/dmidecodemodule.h | |
parent | b007b775afdba38cdc3430ec9c909324d3522fb4 (diff) | |
download | python-dmidecode-11ec71fe19b72a35612fa52cef5c25760e487d7d.tar.gz python-dmidecode-11ec71fe19b72a35612fa52cef5c25760e487d7d.tar.xz python-dmidecode-11ec71fe19b72a35612fa52cef5c25760e487d7d.zip |
Check that the path given with set_dev() is writeable.
Don't crash when writing to a read-only file, return False instead.
Missing an INCREF in get_dev() fixed.
git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@124 abc39116-655e-4be6-ad55-d661dc543056
Diffstat (limited to 'src/dmidecodemodule.h')
-rw-r--r-- | src/dmidecodemodule.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dmidecodemodule.h b/src/dmidecodemodule.h index 02131c6..89eea87 100644 --- a/src/dmidecodemodule.h +++ b/src/dmidecodemodule.h @@ -3,6 +3,9 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> + +#include <sys/types.h> +#include <sys/stat.h> #include <unistd.h> #include "version.h" |