From: Mike Crowe <mac@mcrowe.com>
To: openembedded-core@lists.openembedded.org
Cc: Mike Crowe <mac@mcrowe.com>
Subject: [PATCH 2/2] sanity: Don't hard code value of ENAMETOOLONG
Date: Mon, 25 Nov 2013 15:20:15 +0000 [thread overview]
Message-ID: <1385392815-29916-2-git-send-email-mac@mcrowe.com> (raw)
In-Reply-To: <1385392815-29916-1-git-send-email-mac@mcrowe.com>
Although ENAMETOOLONG is 36 on Linux x86 and x86_64 it does isn't on other
architectures so the value shouldn't be hard coded.
Signed-off-by: Mike Crowe <mac@mcrowe.com>
---
meta/classes/sanity.bbclass | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 0d40792..8531df1 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -184,8 +184,9 @@ def check_create_long_filename(filepath, pathname):
f.close()
os.remove(testfile)
except IOError as e:
- errno, strerror = e.args
- if errno == 36: # ENAMETOOLONG
+ import errno
+ err, strerror = e.args
+ if err == errno.ENAMETOOLONG:
return "Failed to create a file with a long name in %s. Please use a filesystem that does not unreasonably limit filename length.\n" % pathname
else:
return "Failed to create a file in %s: %s.\n" % (pathname, strerror)
--
1.7.10.4
next prev parent reply other threads:[~2013-11-25 15:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-25 15:20 [PATCH 1/2] sanity: Use random filename for maximum path length test Mike Crowe
2013-11-25 15:20 ` Mike Crowe [this message]
2013-11-25 15:48 ` Richard Purdie
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=1385392815-29916-2-git-send-email-mac@mcrowe.com \
--to=mac@mcrowe.com \
--cc=openembedded-core@lists.openembedded.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.