All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mkfs.ubifs: Add support for symlinks in device table
@ 2017-05-18 13:38 David Engraf
  2017-05-18 14:33 ` Richard Weinberger
  2017-05-23  6:52 ` [PATCH v2] " David Engraf
  0 siblings, 2 replies; 15+ messages in thread
From: David Engraf @ 2017-05-18 13:38 UTC (permalink / raw)
  To: linux-mtd; +Cc: David Engraf

It is not possible to change permissions and ownership for symlinks in the
device table file. This patch adds support for symlinks equal to mkfs.jffs2
and updates the sample device table file.

Signed-off-by: David Engraf <david.engraf@sysgo.com>
---
 jffsX-utils/device_table.txt      | 1 +
 ubifs-utils/mkfs.ubifs/devtable.c | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/jffsX-utils/device_table.txt b/jffsX-utils/device_table.txt
index 394a62b..8930cae 100644
--- a/jffsX-utils/device_table.txt
+++ b/jffsX-utils/device_table.txt
@@ -14,6 +14,7 @@
 #	c	Character special device file
 #	b	Block special device file
 #	p	Fifo (named pipe)
+#	l	Link
 # uid is the user id for the target file, gid is the group id for the
 # target file.  The rest of the entried apply only to device special
 # file.
diff --git a/ubifs-utils/mkfs.ubifs/devtable.c b/ubifs-utils/mkfs.ubifs/devtable.c
index dee035d..c96de53 100644
--- a/ubifs-utils/mkfs.ubifs/devtable.c
+++ b/ubifs-utils/mkfs.ubifs/devtable.c
@@ -33,6 +33,7 @@
  * c  Character special device file
  * b  Block special device file
  * p  Fifo (named pipe)
+ * l  Link
  *
  * Don't bother with symlinks (permissions are irrelevant), hard links (special
  * cases of regular files), or sockets (why bother).
@@ -177,6 +178,9 @@ static int interpret_table_entry(const char *line)
 		case 'b':
 			mode |= S_IFBLK;
 			break;
+		case 'l':
+			mode |= S_IFLNK;
+			break;
 		default:
 			return err_msg("unsupported file type '%c'", type);
 	}
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-05-31  9:05 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-18 13:38 [PATCH] mkfs.ubifs: Add support for symlinks in device table David Engraf
2017-05-18 14:33 ` Richard Weinberger
2017-05-18 14:38   ` David Engraf
2017-05-18 14:47     ` Richard Weinberger
2017-05-18 15:03       ` David Engraf
2017-05-18 15:08         ` Richard Weinberger
2017-05-18 15:16           ` David Engraf
2017-05-18 15:27             ` Richard Weinberger
2017-05-18 15:43               ` Richard Weinberger
2017-05-19  6:13                 ` David Engraf
2017-05-19  8:24                   ` Richard Weinberger
2017-05-19  8:47                     ` David Engraf
2017-05-21 21:46                       ` Richard Weinberger
2017-05-23  6:52 ` [PATCH v2] " David Engraf
2017-05-31  9:04   ` David Oberhollenzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.