]> xenbits.xensource.com Git - pvdrivers/win/xenhid.git/commitdiff
Scripted replacement of Copyright notices in source
authorOwen Smith <owen.smith@cloud.com>
Tue, 28 Mar 2023 11:50:40 +0000 (12:50 +0100)
committerPaul Durrant <pdurrant@amazon.com>
Fri, 31 Mar 2023 19:19:46 +0000 (20:19 +0100)
Due to a transfer of copyright ownership from Citrix to Cloud Software Group,
the copyright notices in all source files should be updated.

Using the powershell script below replace "Copyright (c) Citrix Systems, Inc."
with "Copyright (c) Xen Project." and "Copyright (c) Cloud Software Group, Inc."

Function Multiline-Replace {
    param(
        [string]$Filename,
        [string]$ToReplace,
        [array]$ReplaceWith
    )

    $content = Get-Content $Filename
    $replace = $false
    $output = ""
    $content | ForEach {
        $line = $_
        if ($line.Contains($ToReplace)) {
            $replace = $true
            $ReplaceWith | ForEach {
                $output += $line.Replace($ToReplace, $_) + "`n"
            }
        } else {
            $output += $line + "`n"
        }
    }
    if ($replace) {
        Write-Host "Replacing: " $Filename
        $output | Set-Content $Filename
    } else {
        Write-Host "Ignoring:  " $Filename
    }
}

Function Replace-Filestrings {
    param(
        [array]$FilleTypes,
        [string]$ToReplace,
        [array]$Replacements,
        [array]$ExcludeList
    )

    $FileTypes | ForEach {
        Get-ChildItem $_ -Recurse | ForEach-Object {
            $filename = $_
            if (($ExcludeList | %{ $filename -Like $_ }) -Contains $True) {
                Write-Host "Excluding: " $filename
            } else {
                Multiline-Replace $_ $ToReplace $Replacements
            }
        }
    }
}

$ExcludeList = @("*include\xen\*", "*\obj\*")
$Replace = "Copyright (c) Citrix Systems Inc."

$Replacements = @("/* Copyright (c) Xen Project.", " * Copyright (c) Cloud Software Group, Inc.")
$FileTypes = @("*.c", "*.h", "*.rc")
Replace-Filestrings $FileTypes ('/* ' + $Replace) $Replacements $ExcludeList

$Replacements = @("; // Copyright (c) Xen Project.", "; // Copyright (c) Cloud Software Group, Inc.")
$FileTypes = @("*.mc")
Replace-Filestrings $FileTypes ('; // ' + $Replace) $Replacements $ExcludeList

$Replacements = @("; Copyright (c) Xen Project.", "; Copyright (c) Cloud Software Group, Inc.")
$FileTypes = @("*.inf", "*.def")
Replace-Filestrings $FileTypes ('; ' + $Replace) $Replacements $ExcludeList

$Replacements = @("Copyright (c) Xen Project.", "Copyright (c) Cloud Software Group, Inc.")
$FileTypes = @("LICENSE")
Replace-Filestrings $FileTypes $Replace $Replacements $ExcludeList

Signed-off-by: Owen Smith <owen.smith@citrix.com>
Manually fixed whitespace at end of files.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
22 files changed:
LICENSE
include/hid_interface.h
include/store_interface.h
include/suspend_interface.h
src/coinst/coinst.c
src/coinst/xenhid_coinst.def
src/coinst/xenhid_coinst.rc
src/xenhid.inf
src/xenhid/assert.h
src/xenhid/dbg_print.h
src/xenhid/driver.c
src/xenhid/driver.h
src/xenhid/fdo.c
src/xenhid/fdo.h
src/xenhid/names.h
src/xenhid/string.c
src/xenhid/string.h
src/xenhid/thread.c
src/xenhid/thread.h
src/xenhid/types.h
src/xenhid/util.h
src/xenhid/xenhid.rc

diff --git a/LICENSE b/LICENSE
index df521f16e2f8c1ec9244c6666649c6140c0aa03e..b35096e731b9dfb6439d8ab5f9a10507a4668472 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,5 @@
-Copyright (c) Citrix Systems Inc.
+Copyright (c) Xen Project.
+Copyright (c) Cloud Software Group, Inc.
 All rights reserved.
 
 Redistribution and use in source and binary forms,
index 93a88510929662e9f571d89347b1ea53ed6a8237..2e2d9e6b8e4f51236e2cd09adf139666f25a0619 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, 
index 83fed17afffcd7cc34059dceea21b7e61fa57441..616bc366869d8ad045c46c02601171a3802e2635 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms,
index 9ef386b9dc1bb485d220bcbfa383d49f927e9001..ee31d95a3462275d6a9f96cd6e8ed7d5b4345f94 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms,
index aec1ae9dfbb5a264bdd113ac0f36743207589222..2e2e2faab0f874bc2782dade3f8bb273e3c26c64 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, 
index df65c7f13c202a898e34c6b9d1a54c7f8859e988..71d8f65d3c4c5f190f24588a458ea711b06d508f 100644 (file)
@@ -1,4 +1,5 @@
-; Copyright (c) Citrix Systems Inc.
+; Copyright (c) Xen Project.
+; Copyright (c) Cloud Software Group, Inc.
 ; All rights reserved.
 ; 
 ; Redistribution and use in source and binary forms, 
index fc2c4d5193b1d6c5b699bf5cf1817b3af2ce2eab..f9dba02a252043ee034bec21d03c1272d415512b 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms,
@@ -54,4 +55,4 @@
 #define VER_FILETYPE VFT_APP
 #define VER_FILESUBTYPE 0
 
-#include "common.ver"
\ No newline at end of file
+#include "common.ver"
index e42ebb2b38cbbac2b8d519c30d7d9bf19693d390..94b0bece58a1ffe065cc2a63709a4993eccdbf67 100644 (file)
@@ -1,4 +1,5 @@
-; Copyright (c) Citrix Systems Inc.
+; Copyright (c) Xen Project.
+; Copyright (c) Cloud Software Group, Inc.
 ; All rights reserved.
 ;
 ; Redistribution and use in source and binary forms, 
index def95a2b279078ba70c5b0f557c6e087f4b992a1..913938d13ae7b40757a588f03b9ebad9fc617dbd 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, 
index 5686407b0498eb83f0198c68f76401640e235795..5dab9e58aa8a3f1dae33c5c47053df30f933c77f 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, 
index 943651830c2304c59a74db375930296814c5ee90..fb655b00e7e37f478ff16b5b599ac2f026f58901 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, 
index 62020171c15273ddbdf5f3cc8ba41b96c88b166e..093ad0d3b6465484aa62e5422c075b2d7424435d 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, 
index 1df6900a38dd41a73390d347fb647e364f94dd57..7111ba69dbd1a28d6ccc556b35532f63d0826a51 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, 
index f88fc24d92ba3d4efa219bbbf40158aac7efbd0b..1a8931dfd0baf7d6002221a8181bd04a6c839aae 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, 
index a2d9c1597f5e44dfd1d783e727546d3ff0c454b8..be368474e2b991afc72326f514f3f201eecd3668 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms,
index 7d2f1e30a8408f6ba5b5fba10548ba62ed9f9871..e0e22a74a768f77b98b99534f1d22c0ab5248e5e 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms,
index 389239eb2dd14a61c82bb3b6675bf3fbe1b58501..6276fd91735c11d4929d3b674a5c55a7879248f8 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms,
index f643156872b8a893d05f9a4de398d31b28c9da2a..43266bee1919e5832753a8333941902b6ce79bc9 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms,
index 097532d8d069b9859a657af607edec3ee81cf2c8..5373c347b81fe912292e422f365f0d24e43d4145 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms,
index 2517c47089d934712e59010dc0f4a4604318eca6..019417155cb19c505d5446f2c8f82aac8ef9baca 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms, 
index 977e362a4b15113f277f2438f6264735addb9fa5..9ec9d71f50805db09881665cff0f0c04de3d525c 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms,
index 008da3056e932add736d31d401ec044c84bb49ad..63ea8196c22d55e2da11b7f0705ce1bfd2d48320 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (c) Citrix Systems Inc.
+/* Copyright (c) Xen Project.
+ * Copyright (c) Cloud Software Group, Inc.
  * All rights reserved.
  * 
  * Redistribution and use in source and binary forms,