Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157988901
D31619.id94029.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
639 B
Referenced Files
None
Subscribers
None
D31619.id94029.diff
View Options
Index: usr.bin/truncate/truncate.c
===================================================================
--- usr.bin/truncate/truncate.c
+++ usr.bin/truncate/truncate.c
@@ -65,7 +65,9 @@
int do_refer;
int got_size;
char *fname, *rname;
+#ifdef SPACECTL_DEALLOC
struct spacectl_range sr;
+#endif
fd = -1;
rsize = tsize = sz = off = 0;
@@ -201,9 +203,14 @@
tsize = 0;
if (do_dealloc == 1) {
+#ifdef SPACECTL_DEALLOC
sr.r_offset = off;
sr.r_len = len;
r = fspacectl(fd, SPACECTL_DEALLOC, &sr, 0, &sr);
+#else
+ errno = ENODEV;
+ r = -1;
+#endif
}
if (do_truncate == 1)
r = ftruncate(fd, tsize);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 28, 5:28 AM (17 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33578460
Default Alt Text
D31619.id94029.diff (639 B)
Attached To
Mode
D31619: truncate(1): Fix cross-build CI failure due to missing fspacectl
Attached
Detach File
Event Timeline
Log In to Comment