8072694: Need errno info when CDS archive creation fails
authorhseigel
Tue, 10 Feb 2015 09:25:00 -0500
changeset 28950 693ae3d5e1ff
parent 28949 c6f50d62ecef
child 28952 7fe008f8f88c
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
hotspot/src/share/vm/memory/filemap.cpp
--- a/hotspot/src/share/vm/memory/filemap.cpp	Tue Dec 02 19:47:45 2014 +0100
+++ b/hotspot/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;