Re: [ros-dev] [ros-diffs] [cfinck] 75630: [FS_REC] - Add a detection routine for CDFS (ISO-9660) volumes that verifies the Primary Volume Descriptor. - Use this to also detect CDFS on disks and load t

2017-08-21 Thread Pierre Schweitzer
Hi Colin,

Thanks for your work. This commit is likely breaking UDFS recognition
when media has a protective CDFS partition with UDFS afterwards, while
both FSD are unloaded.
You'll first match the CDFS recognizer and not the UDFS recognizer.

I would suggest you modify FsRecRegisterFs() so that you can register
low priority FS.

Cheers,
Pierre

Le 20/08/2017 à 17:30, cfi...@svn.reactos.org a écrit :
> Author: cfinck
> Date: Sun Aug 20 15:30:59 2017
> New Revision: 75630
> 
> URL: http://svn.reactos.org/svn/reactos?rev=75630=rev
> Log:
> [FS_REC]
> - Add a detection routine for CDFS (ISO-9660) volumes that verifies the 
> Primary Volume Descriptor.
> - Use this to also detect CDFS on disks and load the CDFS driver if it has 
> not been loaded yet (e.g. when a bootcd/livecd flashed USB drive is inserted 
> at boot of an installed ReactOS).
> - Fix a comment in udfs.c.
> 
> Added:
> trunk/reactos/drivers/filesystems/fs_rec/cdfs.h   (with props)
> Modified:
> trunk/reactos/drivers/filesystems/fs_rec/cdfs.c
> trunk/reactos/drivers/filesystems/fs_rec/fs_rec.c
> trunk/reactos/drivers/filesystems/fs_rec/udfs.c
> 
> Modified: trunk/reactos/drivers/filesystems/fs_rec/cdfs.c
> URL: 
> http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fs_rec/cdfs.c?rev=75630=75629=75630=diff
> ==
> --- trunk/reactos/drivers/filesystems/fs_rec/cdfs.c   [iso-8859-1] (original)
> +++ trunk/reactos/drivers/filesystems/fs_rec/cdfs.c   [iso-8859-1] Sun Aug 20 
> 15:30:59 2017
> @@ -1,10 +1,10 @@
>  /*
> - * COPYRIGHT:See COPYING in the top level directory
> - * PROJECT:  ReactOS File System Recognizer
> - * FILE: drivers/filesystems/fs_rec/cdfs.c
> - * PURPOSE:  CDFS Recognizer
> - * PROGRAMMER:   Alex Ionescu (alex.ione...@reactos.org)
> - *   Eric Kohl
> + * PROJECT: ReactOS File System Recognizer
> + * LICENSE: GPL-2.0 (https://spdx.org/licenses/GPL-2.0)
> + * PURPOSE: CDFS Recognizer
> + * COPYRIGHT:   Copyright 2002 Eric Kohl
> + *  Copyright 2007 Alex Ionescu 
> + *  Copyright 2017 Colin Finck 
>   */
>  
>  /* INCLUDES 
> */
> @@ -14,13 +14,60 @@
>  #define NDEBUG
>  #include 
>  
> +#include "cdfs.h"
> +
>  /* FUNCTIONS 
> /
> +
> +BOOLEAN
> +NTAPI
> +FsRecIsCdfsVolume(IN PDEVICE_OBJECT DeviceObject,
> +  IN ULONG SectorSize)
> +{
> +BOOLEAN bReturnValue = FALSE;
> +LARGE_INTEGER Offset;
> +PVD_HEADER pVdHeader = NULL;
> +PAGED_CODE();
> +
> +// Read the Primary Volume Descriptor.
> +Offset.QuadPart = VD_HEADER_OFFSET;
> +if (!FsRecReadBlock(DeviceObject, , sizeof(VD_HEADER), 
> SectorSize, (PVOID*), NULL))
> +{
> +// We cannot read this block, so no reason to let the CDFS driver 
> try it.
> +goto Cleanup;
> +}
> +
> +// Verify the fields.
> +if (pVdHeader->Type != VD_TYPE_PRIMARY)
> +goto Cleanup;
> +
> +DPRINT("pVdHeader->Type verified!\n");
> +
> +if (RtlCompareMemory(pVdHeader->Identifier, VD_IDENTIFIER, 
> VD_IDENTIFIER_LENGTH) != VD_IDENTIFIER_LENGTH)
> +goto Cleanup;
> +
> +DPRINT("pVdHeader->Identifier verified!\n");
> +
> +if (pVdHeader->Version != VD_VERSION)
> +goto Cleanup;
> +
> +DPRINT("pVdHeader->Version verified! This is a CDFS volume!\n");
> +
> +bReturnValue = TRUE;
> +
> +Cleanup:
> +if (pVdHeader)
> +ExFreePool(pVdHeader);
> +
> +return bReturnValue;
> +}
>  
>  NTSTATUS
>  NTAPI
>  FsRecCdfsFsControl(IN PDEVICE_OBJECT DeviceObject,
> IN PIRP Irp)
>  {
> +PDEVICE_OBJECT MountDevice;
> +ULONG SectorSize;
>  PIO_STACK_LOCATION Stack;
>  NTSTATUS Status;
>  PAGED_CODE();
> @@ -31,8 +78,21 @@
>  {
>  case IRP_MN_MOUNT_VOLUME:
>  
> -/* We don't validate */
> -Status = STATUS_FS_DRIVER_REQUIRED;
> +/* Assume failure */
> +Status = STATUS_UNRECOGNIZED_VOLUME;
> +
> +/* Get the device object and request the sector size */
> +MountDevice = Stack->Parameters.MountVolume.DeviceObject;
> +if (FsRecGetDeviceSectorSize(MountDevice, ))
> +{
> +/* Check if it's an actual CDFS (ISO-9660) volume */
> +if (FsRecIsCdfsVolume(MountDevice, SectorSize))
> +{
> +/* It is! */
> +Status = STATUS_FS_DRIVER_REQUIRED;
> +}
> +}
> +
>  break;
>  
>  case IRP_MN_LOAD_FILE_SYSTEM:
> 
> Added: trunk/reactos/drivers/filesystems/fs_rec/cdfs.h
> URL: 
> http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fs_rec/cdfs.h?rev=75630
> 

Re: [ros-dev] undelate

2017-08-21 Thread Magnus Johnsson
   1. Send a mail to the list unsubscribe address, which will be of the
   form LISTNAME-leave@DOMAIN. The subject and body of this message will be
   ignored, so it doesn't matter what you put there.

not sure if you found out this yet. Quick google for mailman, which seems
to be what is used :)

2017-08-20 19:39 GMT+02:00 gmusume :

>
> hi I want undelate of the group
> thank
>
>
> Enviado desde mi smartphone Samsung Galaxy.
>
> ___
> Ros-dev mailing list
> Ros-dev@reactos.org
> http://www.reactos.org/mailman/listinfo/ros-dev
>
___
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev

Re: [ros-dev] [ros-diffs] [cfinck] 75586: - Add 0x96 as ISO9660 partition type to ntdddisk.h (from https://en.wikipedia.org/wiki/Partition_type) and detect it using IsRecognizedPartition. - Make our i

2017-08-21 Thread Colin Finck

Am 20.08.2017 um 18:52 schrieb Alex Ionescu:
This is cool work but you do realize that adding non-Windows partition 
types and changing Windows headers (and Windows macros) to work with 
them, as well as forking our CDFS from the Windows CDFS... doesn't 
really help compatibility move forward...


Well, does it break compatibility in any way?
Our version of the IsRecognizedPartition macro is already enclosed in an 
#ifdef __REACTOS__ and has been supporting more partition types than 
Windows even before my changes.
If you want to use our ntdddisk.h for building Windows-compatible 
drivers, you can still do so by not defining __REACTOS__.


I'm not seeing why our CDFS driver shouldn't be able to do more than the 
Windows counterpart does. As long as it doesn't break compatibility with 
the features also supported by the Windows version.
After all, ReactOS isn't meant to be an exact reference implementation 
of Windows.


Even Microsoft has changed the abilities of its CDFS driver drastically 
over time. Just look at how the first Windows 95 version of "cdfs.vxd" 
actually treated Audio CDs: 
http://forest.watch.impress.co.jp/article/1999/03/16/cdfs.gif

I could actually imagine such a useful feature for our cdfs.sys too :)


My suggestion would be a filter driver on 
top of CDFS, and a re-definition of this macro to be used by the filter 
(or whatever code relies on it).


Among other places, this macro is used in ntoskrnl/fstub/disksup.c when 
assigning drive letters. Any partition that isn't recognized doesn't get 
a drive letter, which is really bad if that particular partition is your 
boot partition.



Best regards,

Colin

___
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev