From: Lukas Czerner <lczerner@redhat.com>
To: linux-ext4@vger.kernel.org
Cc: tytso@mit.edu, Lukas Czerner <lczerner@redhat.com>
Subject: [PATCH 1/2] mke2fs: Add revision to the is_before_linux_ver()
Date: Mon, 24 Feb 2014 18:41:05 +0100 [thread overview]
Message-ID: <1393263666-21246-1-git-send-email-lczerner@redhat.com> (raw)
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
misc/mke2fs.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index facbe4c..957b4b6 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -177,7 +177,8 @@ static int parse_version_number(const char *s)
return KERNEL_VERSION(major, minor, rev);
}
-static int is_before_linux_ver(unsigned int major, unsigned int minor)
+static int is_before_linux_ver(unsigned int major, unsigned int minor,
+ unsigned int rev)
{
struct utsname ut;
static int linux_version_code = -1;
@@ -191,10 +192,11 @@ static int is_before_linux_ver(unsigned int major, unsigned int minor)
if (linux_version_code == 0)
return 0;
- return linux_version_code < KERNEL_VERSION(major, minor, 0);
+ return linux_version_code < KERNEL_VERSION(major, minor, rev);
}
#else
-static int is_before_linux_ver(unsigned int major, unsigned int minor)
+static int is_before_linux_ver(unsigned int major, unsigned int minor,
+ unsigned int rev)
{
return 0;
}
@@ -1513,7 +1515,7 @@ profile_error:
memset(&fs_param, 0, sizeof(struct ext2_super_block));
fs_param.s_rev_level = 1; /* Create revision 1 filesystems now */
- if (is_before_linux_ver(2, 2))
+ if (is_before_linux_ver(2, 2, 0))
fs_param.s_rev_level = 0;
if (argc && *argv) {
@@ -1952,7 +1954,7 @@ profile_error:
if (use_bsize == -1) {
use_bsize = sys_page_size;
- if (is_before_linux_ver(2, 6) && use_bsize > 4096)
+ if (is_before_linux_ver(2, 6, 0) && use_bsize > 4096)
use_bsize = 4096;
}
if (lsector_size && use_bsize < lsector_size)
--
1.8.3.1
next reply other threads:[~2014-02-24 17:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-24 17:41 Lukas Czerner [this message]
2014-02-24 17:41 ` [PATCH 2/2] mke2fs: Enable lazy_itable_init on newer kernel by default Lukas Czerner
2014-02-24 17:43 ` Eric Sandeen
2014-03-03 12:53 ` Lukáš Czerner
2014-07-06 1:09 ` Theodore Ts'o
2014-07-06 1:09 ` [PATCH 1/2] mke2fs: Add revision to the is_before_linux_ver() 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=1393263666-21246-1-git-send-email-lczerner@redhat.com \
--to=lczerner@redhat.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).