Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153199565
D31619.id93967.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
629 B
Referenced Files
None
Subscribers
None
D31619.id93967.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 __FreeBSD__
struct spacectl_range sr;
+#endif
fd = -1;
rsize = tsize = sz = off = 0;
@@ -201,9 +203,14 @@
tsize = 0;
if (do_dealloc == 1) {
+#ifdef __FreeBSD__
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
Mon, Apr 20, 6:31 PM (17 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31856929
Default Alt Text
D31619.id93967.diff (629 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