mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
1f0c3d1eeb
This version contains NVME fixes. Edited the patches to modify the package Makefile directly so as to reduce hacks in the OpenWrt Makefile. Added LTO support to lower filesize by ~4KB. Signed-off-by: Rosen Penev <rosenp@gmail.com>
48 lines
1.1 KiB
Diff
48 lines
1.1 KiB
Diff
--- a/bon_file.cpp
|
|
+++ b/bon_file.cpp
|
|
@@ -469,25 +469,37 @@ int COpenTest::delete_sequential(BonTime
|
|
}
|
|
if(m_number_directories != 1)
|
|
{
|
|
- if(chdir("..") || rmdir(buf))
|
|
+ if(chdir(".."))
|
|
{
|
|
+ io_error("chdir");
|
|
+ return -1;
|
|
+ }
|
|
+ if(rmdir(buf))
|
|
+ {
|
|
+ fprintf(stderr, "Unable to delete directory '%s'\n", buf);
|
|
io_error("rmdir");
|
|
return -1;
|
|
}
|
|
}
|
|
}
|
|
- if(chdir("..") || rmdir(m_dirname))
|
|
+ if(count != m_number)
|
|
{
|
|
- io_error("rmdir");
|
|
+ fprintf(stderr, "Expected %d files but only got %d\n", m_number, count);
|
|
return -1;
|
|
}
|
|
- delete m_dirname;
|
|
- m_dirname = NULL;
|
|
- if(count != m_number)
|
|
+ if(chdir(".."))
|
|
{
|
|
- fprintf(stderr, "Expected %d files but only got %d\n", m_number, count);
|
|
+ io_error("chdir");
|
|
+ return -1;
|
|
+ }
|
|
+ if(rmdir(m_dirname))
|
|
+ {
|
|
+ fprintf(stderr, "Unable to delete directory '%s'\n", m_dirname);
|
|
+ io_error("rmdir");
|
|
return -1;
|
|
}
|
|
+ delete m_dirname;
|
|
+ m_dirname = NULL;
|
|
sync();
|
|
timer.stop_and_record(DelSeq);
|
|
timer.add_latency(DelSeq, dur.getMax());
|