| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Build: Add an iscsiuio 'build_date.sh' script
This is currently unused, but will be used by meson to
build the "build_date.[ch]" files used by iscsiuio.
* Build: have git ignore file '.setup'
I commonly use this file for shell aliases/functions.
* Add framework to support building using meson.
This adds the ability to use meson/ninja to build open-iscsi
and iscsiuio, rather than the current system that uses 'autoconf'
for iscsiuio and uses 'make' for everything else.
The old make/autoconf system is left in place, for now, but
deprecated, including a warning about that when running 'make all'
or 'make user' from the top-level.
* utils/build: enhance iscsi-iname to generate prefix
Added new "-g/--generate-iname-prefix" argument to generate the
InitiatorName= prefix. Also, updated iscsi-iname to use getopts.
Also, use the new option from meson.
* git/meson: remove 'builddir' from ignored files
The build directory can be called anything.
Suggested by: Eli Schwartz
* iscsiuio build: fix new build_date.sh script
Fixed several issues:
- fix option handling for "-S"
- fix epoch date handling from env (noticed by Eli Schwartz)
- remove debug statements
* iscsiuio meson: warn when not creating a symlink for iscsiuio
* meson: install man pages more efficiently
We don't need to specify path or subdirectory
* iscsiuio meson: remove unused source date epoch option
This option was never used, since we pass this info
from the environment.
* meson: no need to set libdir: default is fine
* iscsiuio meson: no need to add c_args: already there
* Don't generate initiatorname when cross-building (#367)
Let it be generated by the iscsi-init service.
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
* Set ISCSI_CONFIG_ROOT by meson
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
* Set LOCK_DIR from home_dir to lock_dir
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
* Install iface.example to db_root/ifaces
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
Signed-off-by: TIAN Yuanhao <tianyuanhao3@163.com>
Co-authored-by: TIAN Yuanhao <78596099+tianyuanhao@users.noreply.github.com>
Co-authored-by: TIAN Yuanhao <tianyuanhao3@163.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* build: move utils/sysdeps to top-level
The routines here are used by iscsiuio, so
move them to the top level.
* libopeniscsiusr: fix kernel-doc bugs
There were errors in four places, effecting the generated
manual pages.
* libopeniscsiusr: clean up kernel-doc usage
Simplify generation of library interface documentation using
the kernel-doc script:
* make the kernel-doc perl script executble (the only visible change)
* remove mention of sed (not used)
* stop compressing man pages -- let distros do that
* improve kernel-doc so that doc-preclean.pl and split-man.pl
are no longer needed
* add list-man-pages.sh to simplify things (copied from libnvme)
* build: keep current version number in one place
Move the current version number (now 2.1.7) into
the top-level Makefile, and out of usr/version.h and
libopeniscsiusr/version.h, completely eliminating the
need for the latter.
Note that this ties the libopeniscsiusr library idea of
"version" to the usr/ (iscsid, etc) idea of version, even
though they used to be defined separately. But they always
had the same value, so nothing lost.
* build: insteall man pages uncompressed
We were delivering some man pages compressed and other not, and
it turns out distros know how to install man pages using the
compression they prefer, so stop doing it for them.
|
|
|
|
|
|
| |
Just use PATH to find sed. Not all distributions have moved to a /usr-merged
layout yet.
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
|
|
|
|
|
|
|
|
|
|
| |
This cleans up a little more than "make clean",
in particular removing files generated from templates,
and automake-generated files in iscsiuio.
Also, a ".PHONY:" target was added where needed
so that each Makefile has a complete list of
phony targets.
|
|\
| |
| | |
Build system tweaks from downstream
|
| |
| |
| |
| |
| |
| |
| | |
- Don't hardcode GCC, instead respect the detected CC (or from the environment)
- Use $(RM) as the location may vary and we've already done the work to detect it
Signed-off-by: Sam James <sam@gentoo.org>
|
| |
| |
| |
| | |
The man page is also updated
|
| |
| |
| |
| |
| | |
There were a few spaces accidentally left at the ends
of a few lines in iscsi-gen-initiatorname, so remove them.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update the iscsi-gen-initatorname script to take its
initiator name from the kernel command line, if present.
Also, beef up and simplify the error checking. Error
messages will now go to stderr, and it is now an
error to overwrite the initiatorname file unless
the "force" option is set.
The man page was updated, as well.
|
|/
|
|
| |
We do not need two definitions for "/etc" in utils/Makefile.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit moves the "fwparam_ibft" subdirectory from
being under "utils" to being under "usr", where its
actually used. It also updates usr/Makefile so that
it's smarter about how and when to build the fwparam_ibft
object files it needs, as well as how to build sysdeps.o.
From the top-level Makefile, "make user" will now make
the fwparam_ibft files, as needed for the "user" targets,
before building iscsid and friends.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds two new top-level build options: one
for the "home" directory for open-iscsi called "HOMEDIR",
and one for the "database" directory, called "DBROOT". One can
now override the defaults of "/etc/iscsi" for either or
both of these directories on the make command line.
The README and man pages are updated with details about
these new options.
Some Makefile cleanup/repair was done as well. Installation
of the initiatorname.iscsi file, was moved out of the top-level
Makefile into the etc subdirectory, and installation of man
ages moved from the top-level Makefile to the doc subdirectory.
Also, this fixes some issues from commit fd14dd8316b1 ("Clean
p Makefile build system."), which incorrectly changed the DESTDIR
ariable in the Makefiles. This current commit also fixes the
top-level variable names for moving DBROOT and HOMEDIR.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A major overdue overhaul of the Make layout, including
moving lots of lower-level things out of the top-level
Makefile into the Makefiles for the appropriate subdirectory,
renaming the template files (where @SBINDIR@ gets translated)
so that their purpose is more obvious, making the build more
idempotent (no need to install a file if it's not newer).
Should be no functional change, as no script or C file changed.
Main difference from before: now the udev rules gets made and
installed by default (as part of "make"/"make install"), and
the iscsiuio daemon is now installed for "make install".
One should now be able to go into any subdirectory and type
"make"/"make install" to build and install the targets from
that directory, at least for the etc, utils, and usr
subdirectories.
This change is in preparation for more template translations
coming.
|
|
|
|
|
|
|
| |
This script can be called early in the boot process,
when /tmp is not writable (but /etc/iscsi is), so
change the usage of HEREIS to simple variables.
Otherwise, no change in functionality.
|
|
|
|
|
| |
This matches with iscsi-iname, which already exists and is
used by this script.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The iscsi-gen-initiatorname script seems only to be used by
the SUSE distrubution, so it has never been very "general". This
update makes the script more resiliant, with better error
messages if a problem occurs, as well as more generic, allowing
the caller to set the "base IQN" value, though the default
contains to be the same.
Changes:
- Added use of getopts to parse options
- Added a "-h" option for help
- Added an option to supply base IQN
- Added better checking of options and params
- Added comments to the script itself
- Now check to see if iname file can be written to
(handling read-only mounts better)
- Fixed initiator name listed in file (it was wrong)
- Removed use of printf(1)
- Fixed iBFT initiator name setting in general
- Now set iname file mode to 0600 even when it comes from
iBFT
- Cleaned up the script to use variables instead of repeating
file pathnames or other values
|
|
|
|
|
|
|
|
|
|
| |
A Recent commit, fff82c57f5df ("Use "sbindir" for
path in systemd service files") added the ability
to have our binaries in another location rather
than /sbin (e.g. /usr/sbin), but it was incomplete.
This commit finishes the job.
Fixes: fff82c57f5dfe6d3db795f1195b4d2ebc497d33c
|
|
|
|
|
|
|
| |
Use the correct driver, and handle the NPAR 4-MAC-ADDr offset
of qedi, unlike other Offload cards.
Found-by: David Bond <DBond@suse.com>
|
|
|
|
| |
The iscsi_offload command needs to recognize the "qede" driver.
|
|
|
|
|
|
|
|
|
|
| |
calloc() is called because loop_devs() to allocate memory
which stored in array ofwdev. These memory should be freed
at the end.
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Wu Bo <wubo40@huawei.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bootpath_val is allocated in find_file() and referenced if find_file()
excute successfully, while it was freed in find_file() and
dereferenced after find_file() if find_file() returns 1.
This patch remove free(bootpath_val) in find_file() and free
bootpath_val when it is used done.
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Wu Bo <wubo40@huawei.com>
|
|
|
|
|
|
|
|
|
| |
If strdup() returns NULL, find_devtree() just return NULL to
indicate this function execute failed.
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Wu Bo <wubo40@huawei.com>
|
|
|
|
|
|
|
|
| |
If calloc() returns NULL just return ENOMEM;
if strdup() returns NULL we should free dev and return errno.
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
|
|
|
|
|
|
|
|
|
| |
System call open() might return -1 if an error occurred which
should be taken into consideration.
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Wu Bo <wubo40@huawei.com>
|
|\
| |
| | |
iscsi: Add break to while loop
|
| | |
|
|/ |
|
|
|
|
|
| |
While I was at it, I made the usage message a function
and made it print to stderr insted of stdout.
|
|
|
|
|
| |
Resource Leak: Variable mac_file going out of scope leaks the storage it points to.
Resource Leak: Handle variable mac_fd going out of scope leaks the storage it points to.
|
|
|
|
|
|
| |
Picked up by Coverity as a resource leak on the allocated context,
callers are not expected allocation here (and the function would need to
take a **boot_context if they were)
|
| |
|
|
|
|
| |
Don't know who might be trying to make really long IQNs ¯\_(ツ)_/¯
|
|
|
|
|
| |
We don't actually control the open-iscsi.org domain anymore, so change
the prefix to reflect the use of open-iscsi.com
|
|
|
|
|
|
| |
Update the COPYING file, with the whole GPLv2.0 license,
and a script that seems to have a notice, as well. Both
were outdated and had incorrect FSF addresses.
|
|
|
|
|
|
|
|
|
| |
The compare function is supposed to match the prototype:
int (*compar)(const void *, const void *)
so the function nic_cmp() was declared incorrectly, which
makes gcc much happier.
|
|
|
|
|
| |
I believe it was, at one time, used instead of fwparam_sysfs.c? But
it is not used at all now.
|
|
|
|
|
|
|
|
|
| |
The qedi offload iface does not have netdev associated with it.
Correctly get the transport_name from boot context.
iBFT and offload iface can rely on this method to get the
transport name.
Signed-off-by: Nilesh Javali <nilesh.javali@cavium.com>
|
|
|
|
|
|
| |
__compar_fn_t is not defined in musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* Use libopeniscsiusr for `iscsiadm -m session -P <0-3>` command.
* Use libopeniscsiusr for iSCSI session information used by
`iscsiadm -m node -H <host_no> -P <2 - 4>`command.
* Since `/sys/class/iscsi_session/session1/username` require root
permission, this patch require `iscsiadm` been ran with root
privilege.
Signed-off-by: Gris Ge <fge@redhat.com>
|
|
|
|
|
| |
The modern IP standard stresses the IP prefix length
rather than the mask, so track the IP prefix length.
|
|
|
|
|
|
|
| |
Add a script that logs into all iSCSI firmware
targets, and add a udev rule to call that script
when new targets are detected. Also, add a
man page for the script.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Gcc compiler version 7.2.1 complains about possible string
overflow from prom_parse.y:
> prom_parse.tab.c: In function ‘yyparse’:
> prom_parse.y:98:25: warning: ‘%s’ directive writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-overflow=]
> sprintf($$, "%s/%s", $<str>1, $<str>3);
> ^~~~~~~
So make the string buffer larger. Also, tell the compiler it is
ok if we truncate strings, since our buffer is very large. Lastly,
ensure we use strncpy() when copying strings.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Gcc version 7.2.1 and linux-glibc-devel version 4.14
complain about _SVID_SOURCE, which is deprecated, so
use the replacement of _DEFAULT_SOURCE. The error
message looks like:
> In file included from /usr/include/ftw.h:25:0,
> from fwparam_sysfs.c:23:
> /usr/include/features.h:183:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
> # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
> ^~~~~~~
|
|
|
|
|
|
|
|
|
|
|
| |
Gcc version 7.2.1 complains about string formatting that
may be truncated, generating messages such as:
> fwparam_sysfs.c: In function ‘fwparam_sysfs_boot_info’:
> fwparam_sysfs.c:45:25: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 242 [-Wformat-truncation=]
> #define ISCSI_LLD_ROOT "/sys/firmware/"
Making the destination strings longer fixes this issue.
|
|\
| |
| | |
Add bnx2{,x} software initiator IBFT support
|
| |
| |
| |
| |
| | |
Move iscsistart offload discovery/setup from dump_targets()
(--fwparam_print) to fw_get_targets() (--fwparam_network).
|
|/ |
|
|
|
|
|
|
| |
A recent change, commit 4959a89f421fdebc, modified open-iscsi
to treat the "origin" field as an enum, not a character
string. But one spot was missed.
|
|
|
|
| |
quick fix changing trasnpot into transport
|
|
|
|
|
|
|
| |
Adds code to check for VLAN devices if the boot configuration specifies
a VLAN ID.
Does not create VLANs, they need to already be in place.
|