linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "George Spelvin" <linux@horizon.com>
To: gnehzuil.liu@gmail.com, tytso@mit.edu
Cc: linux-ext4@vger.kernel.org, linux@horizon.com
Subject: Re: debugfs: dump a sparse file as a new sparse file
Date: 1 Jan 2013 15:10:12 -0500	[thread overview]
Message-ID: <20130101201012.3146.qmail@science.horizon.com> (raw)
In-Reply-To: <20130101020841.GA9641@thunk.org>

Theodore Ts'o <tytso@mit.edu> wrote:
> On Thu, Nov 15, 2012 at 04:46:13AM -0000, Zheng Liu wrote:
>> --- a/debugfs/dump.c
>> +++ b/debugfs/dump.c
>> @@ -105,10 +105,11 @@ static void dump_file(const char *cmdname, ext2_ino_t ino, int fd,
>>  {
>>  	errcode_t retval;
>>  	struct ext2_inode	inode;
>> -	char 		buf[8192];
>> +	char 		buf[current_fs->blocksize];

> Note: this is a non-standard/non-portable GCC extension.  The best way
> to fix this is to explicitly malloc the buffer and then free it before
> dump_file exits.

Er... isn't that also in C99?  That should be portable enough.
Is there an actual compiler of interest that doesn't support it?

Here's a set of C99 conformance tests:
http://p99.gforge.inria.fr/c99-conformance/

Gcc, clang, icc, opencc and pcc all support VLAs.
Only tcc lacks support.  Is tcc support an important goal?

  parent reply	other threads:[~2013-01-01 20:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-14  4:07 debugfs feature request: dump sparse files as sparse George Spelvin
2012-11-15 14:46 ` [PATCH] debugfs: dump a sparse file as a new sparse file Zheng Liu
2013-01-01  2:08   ` Theodore Ts'o
2013-01-01 12:33     ` Zheng Liu
2013-01-01 20:10     ` George Spelvin [this message]
2013-01-01 20:57       ` Theodore Ts'o
2013-01-01 21:25         ` George Spelvin
2013-01-01 22:47           ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130101201012.3146.qmail@science.horizon.com \
    --to=linux@horizon.com \
    --cc=gnehzuil.liu@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).