Revision 8f9a87c5
ID | 8f9a87c57f0c6de8a2176f8c988e26d6efb2b50d |
Parent | 24c855a7 |
Child | 55f67cc9 |
SetEtcHostsEntry: maintain existing ordering
Currently RemoveEtcHostsEntry keeps the ordering, but SetEtcHostsEntry
not, as it will always write the new entry at the end of file. I
personally dislike this as it "uglifies" my custom host files, so this
patch makes it update the record instead in-place so to say instead of
moving it.
The patch also simplifies the construction of the new line (we were
doing duplicate work for no gain).
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
Files
- added
- modified
- copied
- renamed
- deleted