Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106986374
D30452.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
662 B
Referenced Files
None
Subscribers
None
D30452.id.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D30452: elfctl: avoid touching file if no change
Attached
Detach File
Event Timeline
Log In to Comment