mirror of
https://github.com/SCST-project/scst.git
synced 2026-10-22 06:02:33 +00:00
Make scst_vdisk and scst_user composite modules so KUnit can link additional objects without including test sources. Rename the implementation files while preserving the module names and update source-path consumers. Move existing private command and device layouts into local headers without changing their fields, constants or logic. No installed interface is expanded.
39 lines
2.0 KiB
Bash
Executable File
39 lines
2.0 KiB
Bash
Executable File
#!/bin/sh
|
|
# Update the version number in SCST source files.
|
|
|
|
usage() {
|
|
echo "Usage: $(basename "$0") <major> <minor> <release> [<suffix>]"
|
|
exit 1
|
|
}
|
|
|
|
if [ $# != 3 ] && [ $# != 4 ]; then
|
|
usage
|
|
fi
|
|
|
|
major=$1
|
|
minor=$2
|
|
release=$3
|
|
suffix=$4
|
|
fv=$major.$minor.$release$suffix
|
|
reldate=$(date "+%d %B %Y")
|
|
|
|
sed -i "s,^\(#define[[:blank:]]*\(FT_VERSION\|ISCSI_VERSION_STRING\|Q2T_VERSION_STRING\|SCST_LOCAL_VERSION\|SCST_VERSION_NAME\|DRV_VERSION\|VERSION_STR\)[[:blank:]]*\)\"[^\"]*\",\1\"$major.$minor.$release$suffix\"," \
|
|
iscsi-scst/kernel/isert-scst/isert.c \
|
|
scst_local/scst_local.c \
|
|
srpt/src/ib_srpt.c \
|
|
fcst/fcst.h \
|
|
iscsi-scst/include/iscsi_scst_ver.h \
|
|
qla2x00t/qla2x00-target/qla2x00t.h \
|
|
qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h \
|
|
scst/include/scst_const.h \
|
|
usr/include/version.h
|
|
sed -i "s,^\(<date>Version[[:blank:]]*\)[^[:blank:]]*\(</date>\),\1$fv\2," doc/scst_user_spec.sgml
|
|
sed -i "s/^Version .*/Version $fv, $reldate/" iscsi-scst/README qla2x00t/qla2x00-target/README scst/README usr/fileio/README
|
|
sed -i "s/^\(\(static const char \*scst_local_version_date\|#define[[:blank:]]*DRV_RELDATE\)[[:blank:]]*\)\"[^\"]*\"/\1\"$reldate\"/" iscsi-scst/kernel/isert-scst/isert.c scst_local/scst_local.c srpt/src/ib_srpt.c
|
|
sed -i "s/^\(#define[[:blank:]]*[^[:blank:]]*_REV[[:blank:]]*\)\"[[:blank:]0-9]*\"/\1\"$(printf "%-4s" ${major}${minor}${release})\"/" usr/fileio/common.h scst/src/dev_handlers/scst_vdisk_main.c
|
|
sed -i "s/^\(#define[[:blank:]]*SCST_VERSION_CODE[[:blank:]]*\).*/\1SCST_VERSION($major, $minor, $release, 0)/" scst/include/scst_const.h
|
|
sed -i "s/^\(#define[[:blank:]]*Q2T_VERSION_CODE[[:blank:]]*\).*/\1Q2T_VERSION($major, $minor, $release, 0)/" \
|
|
qla2x00t/qla2x00-target/qla2x00t.h \
|
|
qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h
|
|
sed -i "s/^\(my .Version[[:blank:]]*=[[:blank:]]*'SCST Configurator v\)[^']*/\1$fv/" scstadmin/scstadmin.sysfs/scstadmin
|