All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Link mkswap to mkfs.swap so mkfs -t swap works
@ 2014-08-03 18:48 Josh Triplett
  2014-08-06 13:31 ` Karel Zak
  0 siblings, 1 reply; 3+ messages in thread
From: Josh Triplett @ 2014-08-03 18:48 UTC (permalink / raw)
  To: util-linux

This makes it easier to write generic code that deals with swap
along with other filesystems.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 disk-utils/Makemodule.am | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/disk-utils/Makemodule.am b/disk-utils/Makemodule.am
index 995e085..3f8f96b 100644
--- a/disk-utils/Makemodule.am
+++ b/disk-utils/Makemodule.am
@@ -59,6 +59,16 @@ endif
 if HAVE_SELINUX
 mkswap_LDADD += -lselinux
 endif
+
+install-exec-hook-mkswap:
+	ln -sf mkswap $(DESTDIR)$(sbindir)/mkfs.swap
+
+uninstall-hook-mkswap:
+	rm -f $(DESTDIR)$(sbindir)/mkfs.swap
+
+INSTALL_EXEC_HOOKS += install-exec-hook-mkswap
+UNINSTALL_HOOKS += uninstall-hook-mkswap
+
 endif # BUILD_MKSWAP
 
 
-- 
2.0.1


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

* Re: [PATCH] Link mkswap to mkfs.swap so mkfs -t swap works
  2014-08-03 18:48 [PATCH] Link mkswap to mkfs.swap so mkfs -t swap works Josh Triplett
@ 2014-08-06 13:31 ` Karel Zak
  2014-08-06 17:51   ` josh
  0 siblings, 1 reply; 3+ messages in thread
From: Karel Zak @ 2014-08-06 13:31 UTC (permalink / raw)
  To: Josh Triplett; +Cc: util-linux

On Sun, Aug 03, 2014 at 11:48:14AM -0700, Josh Triplett wrote:
> This makes it easier to write generic code that deals with swap
> along with other filesystems.

 Hmm... mkfs wrapper is deprecated, it does not provide any
 functionality and it seems better when people use directly the FS
 specific tools to create filesystems.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

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

* Re: [PATCH] Link mkswap to mkfs.swap so mkfs -t swap works
  2014-08-06 13:31 ` Karel Zak
@ 2014-08-06 17:51   ` josh
  0 siblings, 0 replies; 3+ messages in thread
From: josh @ 2014-08-06 17:51 UTC (permalink / raw)
  To: Karel Zak; +Cc: util-linux

On Wed, Aug 06, 2014 at 03:31:03PM +0200, Karel Zak wrote:
> On Sun, Aug 03, 2014 at 11:48:14AM -0700, Josh Triplett wrote:
> > This makes it easier to write generic code that deals with swap
> > along with other filesystems.
> 
>  Hmm... mkfs wrapper is deprecated, it does not provide any
>  functionality and it seems better when people use directly the FS
>  specific tools to create filesystems.

I've come across more than one script that takes a table of partition
sizes/proportions and filesystem types, creates the partitions, and
calls mkfs with the filesystem type.

Some of those scripts directly call mkfs.$type instead, rather than
mkfs -t $type, but either way this change would eliminate a special-case
for swap.

- Josh Triplett

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

end of thread, other threads:[~2014-08-06 17:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-03 18:48 [PATCH] Link mkswap to mkfs.swap so mkfs -t swap works Josh Triplett
2014-08-06 13:31 ` Karel Zak
2014-08-06 17:51   ` josh

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.