Skip to content
  • Brian McFarland's avatar
    Patch to mkenvimage to handle text files with length that exceed env size · 80ee0196
    Brian McFarland authored
    The current head revision of mkenvimage
    (e72be894) will prevent you from creating
    an env image from a text file that is larger than the env length specified
    by the '-s' option.  That doesn't make sense given that the tool now allows
    comments and blank lines.  This patch removes that limitation and allows
    longer text files to be used.
    
    I don't have time / desire at the moment to figure out "patman" and could
    really care less if this is adopted up stream.  Just figured I would share
    in case anybody else finds it useful enough to take time to do a proper
    patch.
    
    >From 39ff30190c2bf687861f4b4b33230f1944fb64f9 Mon Sep 17 00:00:00 2001
    From: Brian McFarland <bmcfarland@rldrake.com>
    Date: Thu, 12 Mar 2015 11:37:19 -0400
    Subject: [PATCH] In mkenvimage, removed the check that prevented using a
     source text file larger than the output environment image.  Instead, the main
     parsing loop checks to see if the environment buffer is full, and quits if it
     is.  After the main parse loop, a second loop swallows comments and
     whitespace until either the EOF is reached or more env vars are found, in
     which case an error will be thrown.
    80ee0196