eofnl: check for extra trailing newlines
Enforce exactly one trailing \n, and fix all of the existing cases. Change-Id: I6218e4700e90aeb647eaee78089530c79993c8c8 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
422eab7106
commit
1a37acda67
@ -19,4 +19,3 @@ integrated into the SPDK build by updating the following line
|
||||
in CONFIG:
|
||||
|
||||
CONFIG_NVME_IMPL=nvme_impl.h
|
||||
|
||||
|
@ -8,4 +8,3 @@ rootdir=$(readlink -f $(dirname $0))
|
||||
$rootdir/autobuild.sh
|
||||
sudo $rootdir/autotest.sh
|
||||
$rootdir/autopackage.sh
|
||||
|
||||
|
@ -1354,4 +1354,3 @@ tr.heading h2 {
|
||||
display:inline;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,4 +165,3 @@
|
||||
UseDigest Auto
|
||||
LUN0 Nvme0
|
||||
QueueDepth 32
|
||||
|
||||
|
@ -72,4 +72,3 @@ struct file_disk {
|
||||
struct file_disk *create_aio_disk(char *fname);
|
||||
|
||||
#endif // SPDK_BLOCKDEV_AIO_H
|
||||
|
||||
|
@ -110,4 +110,3 @@ spdk_cunit_print_results(const char *filename)
|
||||
fclose(out);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
1
lib/env/env.mk
vendored
1
lib/env/env.mk
vendored
@ -70,4 +70,3 @@ ENV_CFLAGS = $(DPDK_INC)
|
||||
ENV_CXXFLAGS = $(ENV_CFLAGS)
|
||||
ENV_LIBS = $(SPDK_ROOT_DIR)/lib/env/libspdk_env.a $(DPDK_LIB)
|
||||
ENV_LINKER_ARGS = -Wl,--start-group -Wl,--whole-archive $(SPDK_ROOT_DIR)/lib/env/libspdk_env.a $(DPDK_LIB) -Wl,--end-group -Wl,--no-whole-archive
|
||||
|
||||
|
@ -177,4 +177,3 @@ int spdk_iscsi_conn_read_data(struct spdk_iscsi_conn *conn, int len,
|
||||
void *buf);
|
||||
|
||||
#endif /* SPDK_ISCSI_CONN_H */
|
||||
|
||||
|
@ -64,4 +64,3 @@ spdk_iscsi_task_get(uint32_t *owner_task_ctr, struct spdk_iscsi_task *parent)
|
||||
|
||||
return task;
|
||||
}
|
||||
|
||||
|
@ -1090,4 +1090,3 @@ nvme_qpair_fail(struct spdk_nvme_qpair *qpair)
|
||||
SPDK_NVME_SC_ABORTED_BY_REQUEST, 1 /* do not retry */, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -215,4 +215,3 @@ spdk_io_channel_get_ctx(struct spdk_io_channel *ch)
|
||||
{
|
||||
return (uint8_t *)ch + sizeof(*ch);
|
||||
}
|
||||
|
||||
|
@ -8,10 +8,19 @@ if [ -z "$f" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -f "$f" && $(tail -c1 "$f") ]]; then
|
||||
if [ ! -f "$f" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ $(tail -c1 "$f") ]]; then
|
||||
echo "$f: No newline at end of file"
|
||||
echo '' >> "$f"
|
||||
exit 1
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ ! $(tail -c2 "$f") ]]; then
|
||||
echo "$f: Extra trailing newline"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -6,4 +6,3 @@ IP=127.0.0.1
|
||||
AuthMethod=CHAP,None
|
||||
UserName=root
|
||||
PassWord=tester
|
||||
|
||||
|
@ -106,4 +106,3 @@ int main(int argc, char **argv)
|
||||
CU_cleanup_registry();
|
||||
return num_failures;
|
||||
}
|
||||
|
||||
|
@ -36,4 +36,3 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)
|
||||
TEST_FILE = nvme_ut.c
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/nvme.unittest.mk
|
||||
|
||||
|
@ -37,4 +37,3 @@ TEST_FILE = nvme_ctrlr_ut.c
|
||||
OTHER_FILES = nvme_intel.c
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/nvme.unittest.mk
|
||||
|
||||
|
@ -36,4 +36,3 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)
|
||||
TEST_FILE = nvme_ctrlr_cmd_ut.c
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/nvme.unittest.mk
|
||||
|
||||
|
@ -37,4 +37,3 @@ TEST_FILE = nvme_ns_cmd_ut.c
|
||||
OTHER_FILES = nvme.c
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/nvme.unittest.mk
|
||||
|
||||
|
@ -36,4 +36,3 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../../../..)
|
||||
TEST_FILE = nvme_qpair_ut.c
|
||||
|
||||
include $(SPDK_ROOT_DIR)/mk/nvme.unittest.mk
|
||||
|
||||
|
@ -1022,4 +1022,3 @@ int main(int argc, char **argv)
|
||||
CU_cleanup_registry();
|
||||
return num_failures;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user