Andre Przywara 
		849f9bef42 
		
	 
	
	
	tools: mkenvimage: Always consider non-regular files ... 
			At the moment mkenvimage has two separate read paths: One to read from
a potential pipe, while dynamically increasing the buffer size, and a
second one using mmap(2), using the input file's size. This is
problematic for two reasons:
- The "pipe" path will be chosen if the input filename is missing or
  "-".  Any named, but non-regular file will use the other path, which
  typically will cause mmap() to fail:
  $ mkenvimage -s 256 -o out <(echo "foo=bar")
- There is no reason to have *two* ways of reading a file, since the
  "pipe way" will always work, even for regular files.
Fix this (and simplify the code on the way) by always using the method
of dynamically resizing the buffer. The existing distinction between
the two cases will merely be used to use the open() syscall or not.
Signed-off-by: Andre Przywara <andre.przywara@arm.com> 
		
	 
		2019-07-18 11:31:26 -04:00 
	 
	
	
		 
	
	
		
			
			
			
			
			
			2019-07-10 16:52:58 -06:00 
		 
	
		
			
			
			
			
			
			2019-05-21 17:33:23 -06:00 
		 
	
		
			
			
			
			
			
			2018-10-08 07:34:34 -06:00 
		 
	
		
			
			
			
			
			
			2019-07-10 16:52:58 -06:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2019-06-20 10:57:08 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-31 08:53:11 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-31 08:53:11 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2019-07-10 16:52:58 -06:00 
		 
	
		
			
			
			
			
			
			2016-06-13 07:46:29 +09:00 
		 
	
		
			
			
			
			
			
			2019-06-14 16:10:48 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2017-10-16 09:42:51 -04:00 
		 
	
		
			
			
			
			
			
			2018-07-10 16:56:00 -04:00 
		 
	
		
			
			
			
			
			
			2019-02-01 14:13:46 -05:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-06-19 07:31:44 -04:00 
		 
	
		
			
			
			
			
			
			2018-11-26 22:52:12 -05:00 
		 
	
		
			
			
			
			
			
			2019-05-18 12:32:02 -04:00 
		 
	
		
			
			
			
			
			
			2019-05-18 12:32:02 -04:00 
		 
	
		
			
			
			
			
			
			2019-05-18 12:32:02 -04:00 
		 
	
		
			
			
			
			
			
			2019-05-18 12:32:02 -04:00 
		 
	
		
			
			
			
			
			
			2019-05-18 12:32:02 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-07-30 07:18:49 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2010-01-26 00:07:13 +01:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-10 20:38:35 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-12-03 10:44:10 -05:00 
		 
	
		
			
			
			
			
			
			2019-03-08 11:31:44 -05:00 
		 
	
		
			
			
			
			
			
			2019-03-08 11:31:44 -05:00 
		 
	
		
			
			
			
			
			
			2013-10-14 16:06:54 -04:00 
		 
	
		
			
			
			
			
			
			2017-06-16 10:11:38 -04:00 
		 
	
		
			
			
			
			
			
			2019-01-28 12:59:03 +01:00 
		 
	
		
			
			
			
			
			
			2019-04-01 17:52:37 +02:00 
		 
	
		
			
			
			
			
			
			2019-01-01 14:12:18 +01:00 
		 
	
		
			
			
			
			
			
			2019-01-01 14:12:18 +01:00 
		 
	
		
			
			
			
			
			
			2018-07-23 11:04:22 +02:00 
		 
	
		
			
			
			
			
			
			2010-07-25 15:17:23 -04:00 
		 
	
		
			
			
			
			
			
			2019-04-26 17:51:51 -04:00 
		 
	
		
			
			
			
			
			
			2019-05-09 20:22:04 -04:00 
		 
	
		
			
			
			
			
			
			2019-05-03 08:14:39 +02:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-09-19 08:59:26 +02:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2019-06-07 11:03:39 -04:00 
		 
	
		
			
			
			
			
			
			2014-12-18 17:26:08 -07:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-11-02 22:39:07 +01:00 
		 
	
		
			
			
			
			
			
			2019-07-18 11:31:26 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2019-07-18 11:31:23 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2019-07-09 07:00:04 +02:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-12-15 11:49:56 -05:00 
		 
	
		
			
			
			
			
			
			2018-11-28 23:04:43 -05:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2009-04-28 01:16:46 +02:00 
		 
	
		
			
			
			
			
			
			2012-09-24 13:17:24 -05:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2019-07-10 16:52:58 -06:00 
		 
	
		
			
			
			
			
			
			2018-05-07 10:24:31 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-10-04 22:55:47 +02:00 
		 
	
		
			
			
			
			
			
			2018-01-28 12:27:30 -05:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2019-07-10 16:52:58 -06:00 
		 
	
		
			
			
			
			
			
			2018-10-03 12:56:50 +02:00 
		 
	
		
			
			
			
			
			
			2019-06-07 11:03:39 -04:00 
		 
	
		
			
			
			
			
			
			2019-05-23 11:36:47 +02:00 
		 
	
		
			
			
			
			
			
			2017-05-05 16:45:57 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2018-09-10 20:20:34 -04:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2011-07-31 23:25:41 +09:00 
		 
	
		
			
			
			
			
			
			2018-05-07 09:34:12 -04:00 
		 
	
		
			
			
			
			
			
			2019-01-24 10:03:44 +01:00 
		 
	
		
			
			
			
			
			
			2018-05-11 09:23:44 +02:00 
		 
	
		
			
			
			
			
			
			2018-05-11 14:54:57 -04:00