- Move nl_open() after kernel_open() to avoid issues when second start could skrew netlink states for the first instance

- Avoid compiler warn_unused_result warning



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1837 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2010-07-17 16:44:22 +00:00
parent a91af4e5d0
commit 492e33a312

View File

@@ -495,7 +495,7 @@ static void event_loop(void)
res = 0;
if (log_daemon)
write(init_report_pipe[1], &res, sizeof(res));
res = write(init_report_pipe[1], &res, sizeof(res));
close(init_report_pipe[1]);
@@ -696,16 +696,16 @@ int main(int argc, char **argv)
}
}
if ((nl_fd = nl_open()) < 0) {
perror("netlink open failed");
exit(-1);
};
if ((ctrl_fd = kernel_open()) < 0)
exit(-1);
init_max_params();
if ((nl_fd = nl_open()) < 0) {
perror("netlink open failed");
exit(-1);
};
#ifndef CONFIG_SCST_PROC
err = kernel_attr_add(NULL, ISCSI_ISNS_SERVER_ATTR_NAME,
S_IRUSR|S_IRGRP|S_IROTH|S_IWUSR, 0);