-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
udev: FC/Loop - use case-insensitive comparison for traddr
Signed-off-by: Martin Belanger <[email protected]>
- Loading branch information
Martin Belanger
committed
Aug 3, 2023
1 parent
f5eb169
commit 4741895
Showing
10 changed files
with
450 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ | |
# | ||
# Authors: Martin Belanger <[email protected]> | ||
# | ||
'''This module provides utility functions/classes to provide easier to use | ||
access to GLib/Gio/Gobject resources. | ||
'''This module provides utility functions (or classes) that simplify | ||
the use of certain GLib/Gio/Gobject functions/resources. | ||
''' | ||
|
||
import logging | ||
|
@@ -443,7 +443,7 @@ def connect(self): | |
# the GLib context. | ||
family = socket.AF_INET if self._traddr.version == 4 else socket.AF_INET6 | ||
self._native_sock = socket.socket(family, socket.SOCK_STREAM | socket.SOCK_NONBLOCK, socket.IPPROTO_TCP) | ||
if isinstance(self._host_iface, str): | ||
if self._host_iface and isinstance(self._host_iface, str): | ||
self._native_sock.setsockopt(socket.SOL_SOCKET, socket.SO_BINDTODEVICE, self._host_iface.encode('utf-8')) | ||
|
||
# Convert socket.socket() to a Gio.Socket() object | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ configure_file( | |
input: '[email protected]', | ||
output: '[email protected]', | ||
install_dir: sd_unit_dir, | ||
copy: true, | ||
configuration: conf, | ||
) | ||
|
||
configure_file( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,13 @@ | |
# This file is part of NVMe STorage Appliance Services (nvme-stas). | ||
# | ||
[Unit] | ||
Description=nvme-stas /etc/nvme/%i auto-generation | ||
Description=nvme-stas @ETC@/nvme/%i auto-generation | ||
Documentation=man:[email protected](8) | ||
ConditionFileNotEmpty=|!/etc/nvme/%i | ||
ConditionFileNotEmpty=|!@ETC@/nvme/%i | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/bin/stasadm %i -f /etc/nvme/%i | ||
ExecStart=/usr/bin/stasadm %i -f @ETC@/nvme/%i | ||
|
||
[Install] | ||
WantedBy=stas-config.target |
Oops, something went wrong.