[ostree] Drop support for fifos and devices
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] Drop support for fifos and devices
- Date: Tue, 16 Jul 2013 13:40:37 +0000 (UTC)
commit 62a896350bd54bff5a9413d2ee0fad7ff4364f9a
Author: Colin Walters <walters verbum org>
Date: Tue Jul 16 09:35:44 2013 -0400
Drop support for fifos and devices
While the first was useful way back in the day when we were importing
Debian bits and /sbin/init was expecting to find /dev/.initctl as a
named pipe, that's no longer an issue with systemd since it uses
dynamic Unix sockets.
Likewise, character and block devices in /dev are now dynamically
created by the devtmpfs from the kernel.
Less complexity and code here if we just support directories, regular
files, and symbolic links.
src/libostree/ostree-core.c | 39 +--------------------------------------
tests/libtest.sh | 1 -
2 files changed, 1 insertions(+), 39 deletions(-)
---
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
index 0749f04..99bc84d 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -1117,14 +1117,6 @@ ostree_file_header_parse (GVariant *metadata,
{
g_file_info_set_attribute_byte_string (ret_file_info, "standard::symlink-target", symlink_target);
}
- else if (S_ISCHR (mode) || S_ISBLK (mode))
- {
- g_file_info_set_attribute_uint32 (ret_file_info, "unix::rdev", rdev);
- }
- else if (S_ISFIFO (mode))
- {
- ;
- }
else
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
@@ -1178,14 +1170,6 @@ ostree_zlib_file_header_parse (GVariant *metadata,
{
g_file_info_set_attribute_byte_string (ret_file_info, "standard::symlink-target", symlink_target);
}
- else if (S_ISCHR (mode) || S_ISBLK (mode))
- {
- g_file_info_set_attribute_uint32 (ret_file_info, "unix::rdev", rdev);
- }
- else if (S_ISFIFO (mode))
- {
- ;
- }
else
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
@@ -1259,23 +1243,6 @@ ostree_create_file_from_input (GFile *dest_file,
goto out;
}
}
- else if (S_ISCHR (mode) || S_ISBLK (mode))
- {
- guint32 dev = g_file_info_get_attribute_uint32 (finfo, "unix::rdev");
- if (mknod (dest_path, mode, dev) < 0)
- {
- ot_util_set_error_from_errno (error, errno);
- goto out;
- }
- }
- else if (S_ISFIFO (mode))
- {
- if (mkfifo (dest_path, mode) < 0)
- {
- ot_util_set_error_from_errno (error, errno);
- goto out;
- }
- }
else
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
@@ -1625,11 +1592,7 @@ ostree_validate_structureof_file_mode (guint32 mode,
{
gboolean ret = FALSE;
- if (!(S_ISREG (mode)
- || S_ISLNK (mode)
- || S_ISCHR (mode)
- || S_ISBLK (mode)
- || S_ISFIFO (mode)))
+ if (!(S_ISREG (mode) || S_ISLNK (mode)))
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Invalid file metadata mode %u; not a valid file type", mode);
diff --git a/tests/libtest.sh b/tests/libtest.sh
index e98dd65..89d50b8 100644
--- a/tests/libtest.sh
+++ b/tests/libtest.sh
@@ -103,7 +103,6 @@ setup_test_repository () {
$OSTREE commit -b test2 -s "Test Commit 1" -m "Commit body first"
mkdir baz
- mkfifo baz/afifo # named pipe
echo moo > baz/cow
echo alien > baz/saucer
mkdir baz/deeper
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]