summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMike Crowe <mac@mcrowe.com>2013-11-25 15:20:15 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-11-25 16:14:48 +0000
commit181875b5d9e5e4826557c2e44cf37e47d14e5e63 (patch)
tree9e26fa8cb26b7e5e68b2aedc1ad81b767dab5b1f /meta
parentd62ced4775517e85f23194d8f7918852ecd8fa69 (diff)
downloadpoky-181875b5d9e5e4826557c2e44cf37e47d14e5e63.tar.gz
sanity: Don't hard code value of ENAMETOOLONG
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. (From OE-Core rev: 11a9cf5ee0daf82097fb2f36b58016f20a5968f3) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/sanity.bbclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 6807a23152..b26ea6b372 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -183,8 +183,9 @@ def check_create_long_filename(filepath, pathname):
183 f.close() 183 f.close()
184 os.remove(testfile) 184 os.remove(testfile)
185 except IOError as e: 185 except IOError as e:
186 errno, strerror = e.args 186 import errno
187 if errno == 36: # ENAMETOOLONG 187 err, strerror = e.args
188 if err == errno.ENAMETOOLONG:
188 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 189 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
189 else: 190 else:
190 return "Failed to create a file in %s: %s.\n" % (pathname, strerror) 191 return "Failed to create a file in %s: %s.\n" % (pathname, strerror)