Page MenuHomeFreeBSD

D30452.id.diff
No OneTemporary

D30452.id.diff

diff --git a/usr.bin/elfctl/elfctl.c b/usr.bin/elfctl/elfctl.c
--- a/usr.bin/elfctl/elfctl.c
+++ b/usr.bin/elfctl/elfctl.c
@@ -291,7 +291,7 @@
static bool
edit_file_features(Elf *elf, int phcount, int fd, char *val, bool endian_swap)
{
- uint32_t features;
+ uint32_t features, prev_features;
uint64_t off;
if (!get_file_features(elf, phcount, fd, &features, &off,
@@ -300,8 +300,12 @@
return (false);
}
+ prev_features = features;
if (!convert_to_feature_val(val, &features))
return (false);
+ /* Avoid touching file if no change. */
+ if (features == prev_features)
+ return (true);
if (endian_swap)
features = bswap32(features);

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 9, 1:45 PM (5 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15732511
Default Alt Text
D30452.id.diff (662 B)

Event Timeline