changeset 7839:4a76ca542247

8072694: Need errno info when CDS archive creation fails Summary: Add errno output to error message when CDS archive creation fails Reviewed-by: dholmes, lfoltan
author hseigel
date Tue, 10 Feb 2015 09:25:00 -0500
parents f27530eb6c46
children d5c8919c43ab
files src/share/vm/memory/filemap.cpp
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/memory/filemap.cpp	Tue Dec 02 19:47:45 2014 +0100
+++ b/src/share/vm/memory/filemap.cpp	Tue Feb 10 09:25:00 2015 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -388,7 +388,8 @@
   remove(_full_path);
   int fd = open(_full_path, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0444);
   if (fd < 0) {
-    fail_stop("Unable to create shared archive file %s.", _full_path);
+    fail_stop("Unable to create shared archive file %s: (%s).", _full_path,
+              strerror(errno));
   }
   _fd = fd;
   _file_offset = 0;