mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Save device information to log from all commands that speak to a device.
This commit is contained in:
@@ -43,6 +43,7 @@ using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.CommonTypes.Structs.Devices.ATA;
|
||||
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||
using Aaru.Core;
|
||||
using Aaru.Core.Logging;
|
||||
using Aaru.Database;
|
||||
using Aaru.Database.Models;
|
||||
using Aaru.Decoders.SCSI;
|
||||
@@ -100,6 +101,8 @@ sealed class DeviceReportCommand : AsyncCommand<DeviceReportCommand.Settings>
|
||||
return (int)ErrorNumber.CannotOpenDevice;
|
||||
}
|
||||
|
||||
DumpLog.StartLog(dev, false);
|
||||
|
||||
Statistics.AddDevice(dev);
|
||||
|
||||
bool isAdmin = dev is Devices.Remote.Device remoteDev2 ? remoteDev2.IsAdmin : DetectOS.IsAdmin;
|
||||
|
||||
@@ -40,6 +40,7 @@ using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Structs.Devices.ATA;
|
||||
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||
using Aaru.Core;
|
||||
using Aaru.Core.Logging;
|
||||
using Aaru.Database;
|
||||
using Aaru.Database.Models;
|
||||
using Aaru.Decoders.DVD;
|
||||
@@ -109,6 +110,8 @@ sealed class DeviceInfoCommand : Command<DeviceInfoCommand.Settings>
|
||||
|
||||
Statistics.AddDevice(dev);
|
||||
|
||||
DumpLog.StartLog(dev, false);
|
||||
|
||||
Table table;
|
||||
|
||||
if(dev.IsUsb)
|
||||
|
||||
@@ -39,6 +39,7 @@ using Aaru.CommonTypes.Structs;
|
||||
using Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||
using Aaru.Core;
|
||||
using Aaru.Core.Devices.Dumping;
|
||||
using Aaru.Core.Logging;
|
||||
using Aaru.Core.Media.Info;
|
||||
using Aaru.Database;
|
||||
using Aaru.Database.Models;
|
||||
@@ -115,6 +116,8 @@ sealed class MediaInfoCommand : Command<MediaInfoCommand.Settings>
|
||||
return (int)ErrorNumber.CannotOpenDevice;
|
||||
}
|
||||
|
||||
DumpLog.StartLog(dev, false);
|
||||
|
||||
Statistics.AddDevice(dev);
|
||||
|
||||
switch(dev.Type)
|
||||
|
||||
@@ -35,6 +35,7 @@ using System.ComponentModel;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.Core;
|
||||
using Aaru.Core.Devices.Scanning;
|
||||
using Aaru.Core.Logging;
|
||||
using Aaru.Localization;
|
||||
using Aaru.Logging;
|
||||
using Humanizer;
|
||||
@@ -100,6 +101,8 @@ sealed class MediaScanCommand : Command<MediaScanCommand.Settings>
|
||||
return (int)ErrorNumber.CannotOpenDevice;
|
||||
}
|
||||
|
||||
DumpLog.StartLog(dev, false);
|
||||
|
||||
Statistics.AddDevice(dev);
|
||||
|
||||
var scanner = new MediaScan(settings.MhddLog, settings.IbgLog, devicePath, dev, settings.UseBufferedReads);
|
||||
|
||||
Reference in New Issue
Block a user