Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-21 Thread Adam
I apologise to all (especially Theo) for my behavior and remarks here, and I apologise if I came across as being arrogant and unwilling to cooperate. I am going to leave for at least 4 weeks to cool off before I post again. Once again, I am sorry. - Adam.

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation. Mk II.

2014-09-20 Thread Adam
I got of to a bit of a bad start with this patch, and things were allover the place. I knew it was bad when Theo gave me a bit of a boot. And so now I think it is time for Mk II. Hopefully I don't make an ass out of myself this time. I eliminated some unused definitions that were added in Rev 5.

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-19 Thread Adam
On Fri, 19 Sep 2014 16:08:33 +0200 Otto Moerbeek wrote: > On Fri, Sep 19, 2014 at 10:21:13PM +1000, Adam wrote: > > > Patch for argument parsing below. > > > > Diff taken in relation to Revision 3 of the aforementioned patch. > > > > I do not understand why this should be a separate diff for t

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-19 Thread Otto Moerbeek
On Fri, Sep 19, 2014 at 10:21:13PM +1000, Adam wrote: > Patch for argument parsing below. > > Diff taken in relation to Revision 3 of the aforementioned patch. > > I do not understand why this should be a separate diff for this, as it > is essentially part of the functionality itself. > > Let m

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-19 Thread Adam
Patch for argument parsing below. Diff taken in relation to Revision 3 of the aforementioned patch. I do not understand why this should be a separate diff for this, as it is essentially part of the functionality itself. Let me know if you want it all together. --- mount_tmpfs.c Fri Sep

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-19 Thread Adam
Revision 3: - if (template) -> if (template[0] != '\0') (From Revision 2): 1. Added code to allow updating MNT_RDONLY status with M. If MNT_WANTRDWR is specified as well, MNT_RDONLY is unset. 2. Added check for strlcpy() call. 3. If getenv() is deemed "unsafe" to call, just use the defau

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-19 Thread Adam
On Fri, 19 Sep 2014 10:58:59 +0200 Henning Brauer wrote: > HUH? > > Doug is entirely right. src is user controlled and can be larger than > mountpoint. In that case, we want to bail and whine at the user > instead of silently truncating and going on. > Thanks for clarifying that; I thought he

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-19 Thread Adam
Documentation update: Index: mount_tmpfs.8 === RCS file: /cvs/src/sbin/mount_tmpfs/mount_tmpfs.8,v retrieving revision 1.3 diff -u -p -r1.3 mount_tmpfs.8 --- mount_tmpfs.8 5 Feb 2014 15:32:26 - 1.3 +++ mount_tmpfs.8

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-19 Thread Henning Brauer
* Adam [2014-09-19 10:37]: > On Fri, 19 Sep 2014 00:14:47 -0700 > Doug Hogan wrote: > > On Thu, Sep 18, 2014 at 09:28:41AM +0100, bytevolc...@safe-mail.net > > wrote: > > > + strlcpy(mountpoint, src, sizeof(mountpoint)); > > > > The strlcpy call should check for truncation. There's no g

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-19 Thread Adam
On Fri, 19 Sep 2014 00:14:47 -0700 Doug Hogan wrote: > On Thu, Sep 18, 2014 at 09:28:41AM +0100, bytevolc...@safe-mail.net > wrote: > > Revised diffbelow: > > You are inheriting some bugs in here by reusing newfs code. :) > > I agree with the comments from others. Additional comments: > > >

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-19 Thread Adam
Revision 2: 1. Fixed up an issue caused by bad diffing technique. 2. Only functionality changes included here; parsing changes to follow next as per Otto's instruction. 3. Documentation changes will follow as well. 4. I have received some more feedback from Doug Hogan regarding newfs bugs,

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-19 Thread Doug Hogan
On Thu, Sep 18, 2014 at 09:28:41AM +0100, bytevolc...@safe-mail.net wrote: > Revised diffbelow: You are inheriting some bugs in here by reusing newfs code. :) I agree with the comments from others. Additional comments: > #include > +#include ... > + args.ta_root_mode = modeset ? mode : s

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-18 Thread Alexander Hall
On September 18, 2014 9:40:44 AM CEST, bytevolc...@safe-mail.net wrote: >This patch adds an option "-t template" to mount_tmpfs, which >populates the new tmpfs volume with a directory >immediately after creation. > >Man page update included for explanation. > >Much of the code was grafted from ne

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-18 Thread bytevolcano
>In the mount_tmpfs.8 diff, you talk about mfs... :) > >Landry Serves me right for coding while I'm sick. Revised diffbelow: Index: mount_tmpfs.8 === RCS file: /cvs/src/sbin/mount_tmpfs/mount_tmpfs.8,v retrieving revision 1.3 dif

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-18 Thread Otto Moerbeek
On Thu, Sep 18, 2014 at 08:40:44AM +0100, bytevolc...@safe-mail.net wrote: > This patch adds an option "-t template" to mount_tmpfs, which > populates the new tmpfs volume with a directory > immediately after creation. > > Man page update included for explanation. > > Much of the code was grafte

Re: [PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-18 Thread Landry Breuil
On Thu, Sep 18, 2014 at 08:40:44AM +0100, bytevolc...@safe-mail.net wrote: > This patch adds an option "-t template" to mount_tmpfs, which > populates the new tmpfs volume with a directory > immediately after creation. > > Man page update included for explanation. > > Much of the code was grafted

[PATCH] Option for mount_tmpfs to populate the volume after creation.

2014-09-18 Thread bytevolcano
This patch adds an option "-t template" to mount_tmpfs, which populates the new tmpfs volume with a directory immediately after creation. Man page update included for explanation. Much of the code was grafted from newfs which implements this for mount_mfs ("-P" option). Suggestions, fixes, criti