summaryrefslogtreecommitdiffstats
path: root/src/dmidecodemodule.h
diff options
context:
space:
mode:
authornima <nima@abc39116-655e-4be6-ad55-d661dc543056>2008-12-19 13:21:24 +0000
committernima <nima@abc39116-655e-4be6-ad55-d661dc543056>2008-12-19 13:21:24 +0000
commit11ec71fe19b72a35612fa52cef5c25760e487d7d (patch)
tree51908a8cb1ea1d89a32284c73fcc9e035062c37b /src/dmidecodemodule.h
parentb007b775afdba38cdc3430ec9c909324d3522fb4 (diff)
downloadpython-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.h3
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"