On 05/25/2018 12:30 AM, enh wrote:
> ping?
Just pushed a largeish patch, I don't _think_ I broke anything?
I need a set of test files for these. It can produce something like a hundred
different kinds of output and I haven't got files that replicate that.
Probably what I should have is a tarball
Yeah, my fault. Sorry.
I should just make the mmap() failure fail gracefully and not provide that part
of the elf information. Lemme make a stab at that...
Rob
On 05/25/2018 12:30 AM, enh wrote:
> ping?
> On Mon, May 7, 2018 at 1:35 PM Rob Landley wrote:
>
>> I got distracted over the weekend,
ping?
On Mon, May 7, 2018 at 1:35 PM Rob Landley wrote:
> I got distracted over the weekend, but lemme see if I can come up with a
more
> elegant solution this evening before falling back to that plan.
> Thanks,
> Rob
> On 05/07/2018 01:50 PM, enh wrote:
> > testing with `cat boot.img | strace
I got distracted over the weekend, but lemme see if I can come up with a more
elegant solution this evening before falling back to that plan.
Thanks,
Rob
On 05/07/2018 01:50 PM, enh wrote:
> testing with `cat boot.img | strace file -` it looks like FSF
> allocates a ~10MiB buffer and reads it al
testing with `cat boot.img | strace file -` it looks like FSF
allocates a ~10MiB buffer and reads it all in. (rather than copying to
a temporary file.)
happy to supply that patch instead if you prefer?
On Sat, May 5, 2018 at 4:45 PM, Rob Landley wrote:
> On 05/05/2018 06:19 PM, enh wrote:
>> AFK
On 05/05/2018 06:19 PM, enh wrote:
> AFK, but I'm using glibc too, from Debian testing.
I found it, the stdin case is using the stat.length value to see how much to
read but never did the stat, so it's uninitialized stack crap. When it's zero...
Oops. Oddly enough, the compiler did not complain!
AFK, but I'm using glibc too, from Debian testing.
On Sat, May 5, 2018, 16:01 Rob Landley wrote:
> On 05/05/2018 02:14 PM, enh wrote:
> > On Sat, May 5, 2018 at 10:53 AM, Rob Landley wrote:
> > well, strictly i think only the ELF case actually needs this
> > currently. we could fix the logic fo
On 05/05/2018 02:14 PM, enh wrote:
> On Sat, May 5, 2018 at 10:53 AM, Rob Landley wrote:
> well, strictly i think only the ELF case actually needs this
> currently. we could fix the logic for the non-ELF cases (see below)
> and only copy to a temporary file for the ELF case. (alternatively, we
> c
On Sat, May 5, 2018 at 10:53 AM, Rob Landley wrote:
> On 05/04/2018 12:53 PM, enh wrote:
>> okay, here's an alternative patch that only does the temporary file
>> dance for regular files...
>
> Aren't regular files already seekable?
>
> Do pipes show up as regular files for the originally unseekab
On 05/04/2018 12:53 PM, enh wrote:
> okay, here's an alternative patch that only does the temporary file
> dance for regular files...
Aren't regular files already seekable?
Do pipes show up as regular files for the originally unseekable case (which I'm
guessing is something like "cat a.out | file
> But if we copy /dev/zero to a temp file we'll fill the hard drive...
Not necessarily so: dd if=/dev/zero of=file.img bs=64M count=1 conv=fsync
status=progress
This file would end up 64 megabyte in size.
Alain
___
Toybox mailing list
Toybox@lists.l
okay, here's an alternative patch that only does the temporary file
dance for regular files...
[PATCH] Implement `file -`.
Previously we'd just always bogusly report "empty".
---
tests/file.test | 6 ++
toys/posix/file.c | 34 +++---
2 files changed, 33 insert
the FSF file(1) is inconsistent too, in a way that suggests it's being
clever:
~$ file /dev/zero
/dev/zero: character special (1/5)
~$ file - < /dev/zero
/dev/stdin: data
~$
On Thu, May 3, 2018, 18:36 Rob Landley wrote:
> On 05/03/2018 06:40 PM, enh wrote:
> > +// If we're working on stdi
On 05/03/2018 06:40 PM, enh wrote:
> +// If we're working on stdin, copy to a temporary file and then use
> +// an fd for that file. That way the rest of the code doesn't have to
> +// worry about non-seekable/non-mmap'able input.
Hmmm, in the old code:
$ ./file ../filesystems.tar.gz
Previously we'd just always bogusly report "empty".
---
tests/file.test | 2 ++
toys/posix/file.c | 20 +---
2 files changed, 19 insertions(+), 3 deletions(-)
From fe3639f24995cc96f5a05eacae52f0b624f3af7c Mon Sep 17 00:00:00 2001
From: Elliott Hughes
Date: Thu, 3 May 2018 16:39
I have gathered quite a bit of magic/offset/mime-type data here:
https://github.com/technosaurus/MIMEtype
It does the equivalent of file -m
Basically all of the mime types with magic at offset 0 (most
common offset are checked first using binary search and
memcmp, Then offsets at 4 and 8.
All o
On Sun, Feb 14, 2016 at 10:40 AM, Rob Landley wrote:
> On Sat, Feb 13, 2016 at 3:57 PM, Isaac Dunham wrote:
>> On Sat, Feb 13, 2016 at 09:56:29AM -0800, enh wrote:
>>> Unlike the POSIX file(1), there's no magic file here, just hard-coded
>>> common (non-obsolete) file formats. Personally most of
On Sat, Feb 13, 2016 at 3:57 PM, Isaac Dunham wrote:
> On Sat, Feb 13, 2016 at 09:56:29AM -0800, enh wrote:
>> Unlike the POSIX file(1), there's no magic file here, just hard-coded
>> common (non-obsolete) file formats. Personally most of my use of file(1)
>> is as a one-line readelf(1) summarizer
On Sat, Feb 13, 2016 at 09:56:29AM -0800, enh wrote:
> Unlike the POSIX file(1), there's no magic file here, just hard-coded
> common (non-obsolete) file formats. Personally most of my use of file(1)
> is as a one-line readelf(1) summarizer, so although I assume a full POSIX
> file(1) is out of sco
On Sat, Feb 13, 2016 at 9:56 AM enh wrote:
> Unlike the POSIX file(1), there's no magic file here, just hard-coded
> common (non-obsolete) file formats. Personally most of my use of file(1)
> is as a one-line readelf(1) summarizer, so although I assume a full POSIX
> file(1) is out of scope (beca
Unlike the POSIX file(1), there's no magic file here, just hard-coded
common (non-obsolete) file formats. Personally most of my use of file(1)
is as a one-line readelf(1) summarizer, so although I assume a full POSIX
file(1) is out of scope (because just the database would likely be larger
than all
21 matches
Mail list logo