start next; log error msgs when parsing network url

This commit is contained in:
IgnorantGuru 2012-05-24 16:09:42 -06:00
parent 8a12f62fff
commit 952cddc64f
7 changed files with 21 additions and 19 deletions

View File

@ -1,3 +1,5 @@
0.2.0 2012-05-19:
0.2.1
log error msgs when parsing network url
0.2.0 2012-05-22:
initial test release

6
README
View File

@ -1,4 +1,4 @@
README for udevil v0.2.0 ALPHA TEST VERSION
README for udevil v0.2.0+ ALPHA TEST VERSION
THIS RELEASE IS FOR INITIAL TESTING PURPOSES ONLY - USE AT YOUR OWN RISK.
@ -44,8 +44,8 @@ DESCRIPTION
PACKAGES
Arch's AUR will soon include udevil-git:
http://aur.archlinux.org/packages.php?O=0&K=udevil&do_Search=Go
Arch's AUR includes udevil-git:
https://aur.archlinux.org/packages.php?ID=59463
Debian-based deb packages are provided in Downloads:
(to save a file, click on its filename and click 'View Raw'):

2
configure vendored
View File

@ -2727,7 +2727,7 @@ fi
# Define the identity of the package.
PACKAGE=udevil
VERSION=0.2.0
VERSION=0.2.0+
cat >>confdefs.h <<_ACEOF

View File

@ -3,7 +3,7 @@ AC_PREREQ(2.52)
AC_INIT(src/udevil.c)
AM_CONFIG_HEADER(config.h)
AC_CONFIG_SRCDIR(src)
AM_INIT_AUTOMAKE(udevil, 0.2.0)
AM_INIT_AUTOMAKE(udevil, 0.2.0+)
AC_PROG_INTLTOOL([0.21])

4
debian/changelog vendored
View File

@ -1,5 +1,5 @@
udevil (0.2.0-1) unstable; urgency=low
udevil (0.2.0+-1) unstable; urgency=low
* release
-- IgnorantGuru <ignorantguru@gmx.com> Tue, 22 May 2012 17:53:19 +0000
-- IgnorantGuru <ignorantguru@gmx.com> Thu, 24 May 2012 22:04:54 +0000

View File

@ -19,7 +19,7 @@
GETTEXT_PACKAGE = udevil
PACKAGE = udevil
VERSION = 0.2.0
VERSION = 0.2.0+
SHELL = /bin/bash
@ -28,7 +28,7 @@ top_srcdir = ..
top_builddir = ..
prefix = /usr/local
prefix = /usr
exec_prefix = ${prefix}
datadir = ${datarootdir}
datarootdir = ${prefix}/share

View File

@ -2225,22 +2225,22 @@ static int parse_network_url( const char* url, const char* fstype,
{
if ( !strcmp( nm->fstype, "nfs" ) && strcmp( fstype, "nfs" ) )
{
printf( "udevil: error: invalid type '%s' for NFS share - must be 'nfs'\n",
fstype );
wlog( "udevil: error: invalid type '%s' for NFS share - must be 'nfs'\n",
fstype, 2 );
bad_type = TRUE;
}
else if ( !strcmp( nm->fstype, "smbfs" ) && strcmp( fstype, "smbfs" ) )
{
printf( "udevil: error: invalid type '%s' for SMB share - must be 'smbfs'\n",
fstype );
wlog( "udevil: error: invalid type '%s' for SMB share - must be 'smbfs'\n",
fstype, 2 );
bad_type = TRUE;
}
else if ( !strcmp( nm->fstype, "ftpfs" ) || !strcmp( nm->fstype, "curlftpfs" ) )
{
if ( strcmp( fstype, "ftpfs" ) && strcmp( fstype, "curlftpfs" ) )
{
printf( "udevil: error: invalid type '%s' for FTP share - must be 'ftpfs' or 'curlftpfs'\n",
fstype );
wlog( "udevil: error: invalid type '%s' for FTP share - must be 'ftpfs' or 'curlftpfs'\n",
fstype, 2 );
bad_type = TRUE;
}
else
@ -2258,7 +2258,7 @@ static int parse_network_url( const char* url, const char* fstype,
|| ( nm->pass && strchr( nm->pass, ' ' ) )
|| ( nm->port && strchr( nm->port, ' ' ) ) )
{
printf( "udevil: error: invalid network url\n", fstype );
wlog( "udevil: error: invalid network url\n", fstype, 2 );
bad_type = TRUE;
}
}
@ -2270,13 +2270,13 @@ static int parse_network_url( const char* url, const char* fstype,
{
if ( !( nm->ip = get_ip( nm->host ) ) || ( nm->ip && nm->ip[0] == '\0' ) )
{
printf( "udevil: error: lookup host '%s' failed\n", nm->host );
wlog( "udevil: error: lookup host '%s' failed\n", nm->host, 2 );
g_free( nm->host );
nm->host = NULL;
}
}
else
printf( "udevil: error: '%s' is not a recognized network url\n", url );
wlog( "udevil: error: '%s' is not a recognized network url\n", url, 2 );
}
if ( ret == 0 || !nm->host || bad_type )