From c55eaa7d5e377ad6f1a48c6bdd83e6c1e1277bf8 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 14 Oct 2018 22:02:24 +0000 Subject: [PATCH] iscsi-scstd: Change the gcc-specific __FUNCTION__ into __func__ git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7520 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/usr/chap.c | 6 +++--- iscsi-scst/usr/event.c | 4 ++-- iscsi-scst/usr/iscsi_scstd.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/iscsi-scst/usr/chap.c b/iscsi-scst/usr/chap.c index 8ba321246..f5d69b10f 100644 --- a/iscsi-scst/usr/chap.c +++ b/iscsi-scst/usr/chap.c @@ -282,7 +282,7 @@ static int chap_decode_string(char *encoded, u8 *decode_buf, int buf_len, int en if ((strlen(encoded) - 2) > (2 * buf_len)) { log_error("%s(%d) BUG? " " buf[%d] !sufficient to decode string[%d]", - __FUNCTION__, __LINE__, buf_len, (int) strlen(encoded)); + __func__, __LINE__, buf_len, (int) strlen(encoded)); return CHAP_TARGET_ERROR; } decode_hex_string(encoded + 2, decode_buf, buf_len); @@ -291,7 +291,7 @@ static int chap_decode_string(char *encoded, u8 *decode_buf, int buf_len, int en if ((strlen(encoded) - 2) > ((buf_len - 1) / 3 + 1) * 4) { log_error("%s(%d) BUG? " " buf[%d] !sufficient to decode string[%d]", - __FUNCTION__, __LINE__, buf_len, (int) strlen(encoded)); + __func__, __LINE__, buf_len, (int) strlen(encoded)); return CHAP_TARGET_ERROR; } decode_base64_string(encoded + 2, decode_buf, buf_len); @@ -658,7 +658,7 @@ int cmnd_exec_auth_chap(struct connection *conn) break; default: log_error("%s(%d): BUG. unknown conn->auth_state %d", - __FUNCTION__, __LINE__, conn->auth_state); + __func__, __LINE__, conn->auth_state); res = CHAP_TARGET_ERROR; } diff --git a/iscsi-scst/usr/event.c b/iscsi-scst/usr/event.c index c11efcce2..7dcdd5afa 100644 --- a/iscsi-scst/usr/event.c +++ b/iscsi-scst/usr/event.c @@ -1185,7 +1185,7 @@ int nl_open(void) nl_fd = socket(PF_NETLINK, SOCK_RAW, NETLINK_ISCSI_SCST); if (nl_fd == -1) { - log_error("%s %s\n", __FUNCTION__, strerror(errno)); + log_error("%s %s\n", __func__, strerror(errno)); return -1; } @@ -1201,7 +1201,7 @@ int nl_open(void) res = nl_write(nl_fd, NULL, 0); if (res < 0) { - log_error("%s %d\n", __FUNCTION__, res); + log_error("%s %d\n", __func__, res); close(nl_fd); return res; } diff --git a/iscsi-scst/usr/iscsi_scstd.c b/iscsi-scst/usr/iscsi_scstd.c index eb51baebf..0b4e5ba6d 100644 --- a/iscsi-scst/usr/iscsi_scstd.c +++ b/iscsi-scst/usr/iscsi_scstd.c @@ -705,9 +705,9 @@ static void event_loop(void) "you can decrease iscsi_scstd.c::INCOMING_MAX " "constant to a lower value, e.g. 128, then " "recompile and reinstall the user space part " - "of iSCSI-SCST.", __FUNCTION__); + "of iSCSI-SCST.", __func__); else - log_error("%s: poll() failed: %s", __FUNCTION__, + log_error("%s: poll() failed: %s", __func__, strerror(errno)); exit(1); }