return 0;
}
*(tmp++)=0;
- if(inet_aton(line,&addr)) {
+ if(!inet_aton(line,&addr)) {
msg4(LOG_CRIT, ERRMSG, line, opts->server->authname);
return 0;
}
#ifdef HAVE_SYS_IOCTL_H
#ifdef BLKGETSIZE64
DEBUG("looking for export size with ioctl BLKGETSIZE64\n");
- if (!ioctl(fhandle, BLKGETSIZE64, bytes) && bytes) {
+ if (!ioctl(fhandle, BLKGETSIZE64, &bytes) && bytes) {
return (off_t)bytes;
}
#endif /* BLKGETSIZE64 */
* @param serve the server we want to connect.
**/
void setup_serve(SERVER *serve) {
- struct sockaddr_storage addrin;
struct addrinfo hints;
struct addrinfo *ai = NULL;
struct sigaction sa;
- int addrinlen = sizeof(addrin);
int sock_flags;
#ifndef sun
int yes=1;
}
}
- if(!servers || !servers->len) {
+ if(!servers || !servers->len) {
g_warning("Could not parse config file: %s",
err ? err->message : "Unknown error");
}
-
+ if(serve) {
+ g_warning("Specifying an export on the command line is deprecated.");
+ g_warning("Please use a configuration file instead.");
+ }
+
if((!serve) && (!servers||!servers->len)) {
g_message("Nothing to do! Bye!");
exit(EXIT_FAILURE);