diff options
| author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-05-22 16:05:56 +0000 | 
|---|---|---|
| committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2006-05-22 16:05:56 +0000 | 
| commit | 16881b84f74734b0982678003e54db95dc857296 (patch) | |
| tree | e231587632272b606c81cdb2ad69e3cfd348d6c7 /hardinfo2 | |
| parent | ccfcc4622733b446d103146acb704ab73fbfbfe4 (diff) | |
Fix segfault
Diffstat (limited to 'hardinfo2')
| -rw-r--r-- | hardinfo2/arch/linux/common/nfs.h | 3 | ||||
| -rwxr-xr-x | hardinfo2/configure | 2 | 
2 files changed, 4 insertions, 1 deletions
| diff --git a/hardinfo2/arch/linux/common/nfs.h b/hardinfo2/arch/linux/common/nfs.h index 675bc851..5ae22797 100644 --- a/hardinfo2/arch/linux/common/nfs.h +++ b/hardinfo2/arch/linux/common/nfs.h @@ -12,6 +12,9 @@ scan_nfs_shared_directories(void)      nfs_shares_list = g_strdup("");      exports = fopen("/etc/exports", "r"); +    if (!exports) +        return; +              while (fgets(buf, 512, exports)) {          if (buf[0] != '/')              continue; diff --git a/hardinfo2/configure b/hardinfo2/configure index d70efbf2..8b8d06f9 100755 --- a/hardinfo2/configure +++ b/hardinfo2/configure @@ -24,7 +24,7 @@ PACKAGE=`basename ${PWD} | cut -d"-" -f1`;  VERSION=`basename ${PWD} | cut -d"-" -f2`;  if [ "$PACKAGE" == "$VERSION" ]; then -	VERSION=$( printf "SVN_%d" $( svn info|grep Revision|cut -d":" -f2 )) +	VERSION=$(printf "SVN_%d" $(svn -R info|grep Revision|cut -d: -f2|sort -n |uniq|tail -n1))  	RELEASE=0  else  	RELEASE=1 | 
