summaryrefslogtreecommitdiffstats
path: root/usr.sbin/makefs
diff options
context:
space:
mode:
authoryasuoka <yasuoka@openbsd.org>2017-10-31 13:32:40 +0000
committeryasuoka <yasuoka@openbsd.org>2017-10-31 13:32:40 +0000
commit8f42770e1f532215b548e5849d8267a896e952ae (patch)
tree4cd6b50c9c67563a65c2faf2c9ff6442516ca2d3 /usr.sbin/makefs
parentInitialize boot_catalog_entry's entry_type properly. This had been (diff)
downloadwireguard-openbsd-8f42770e1f532215b548e5849d8267a896e952ae.tar.xz
wireguard-openbsd-8f42770e1f532215b548e5849d8267a896e952ae.zip
Fix a bug which made the boot entries' order reverse, introduced at 1.8 on
NetBSD. seem fine deraadt
Diffstat (limited to 'usr.sbin/makefs')
-rw-r--r--usr.sbin/makefs/cd9660/cd9660_eltorito.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/makefs/cd9660/cd9660_eltorito.c b/usr.sbin/makefs/cd9660/cd9660_eltorito.c
index 0fa3091c2da..7686ac4bd8a 100644
--- a/usr.sbin/makefs/cd9660/cd9660_eltorito.c
+++ b/usr.sbin/makefs/cd9660/cd9660_eltorito.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd9660_eltorito.c,v 1.10 2017/10/31 13:29:42 yasuoka Exp $ */
+/* $OpenBSD: cd9660_eltorito.c,v 1.11 2017/10/31 13:32:40 yasuoka Exp $ */
/* $NetBSD: cd9660_eltorito.c,v 1.20 2013/01/28 21:03:28 christos Exp $ */
/*
@@ -155,11 +155,12 @@ cd9660_add_boot_disk(iso9660_disk *diskStructure, const char *boot_info)
break;
}
- if (tmp_image == NULL) {
+ if (tmp_image == NULL)
TAILQ_INSERT_HEAD(&diskStructure->boot_images, new_image,
image_list);
- } else
- TAILQ_INSERT_BEFORE(tmp_image, new_image, image_list);
+ else
+ TAILQ_INSERT_AFTER(&diskStructure->boot_images, tmp_image,
+ new_image, image_list);
new_image->serialno = diskStructure->image_serialno++;