]> xenbits.xensource.com Git - pvdrivers/win/xennet.git/commitdiff
Scripted replacement of Copyright notices in source
authorOwen Smith <owen.smith@citrix.com>
Thu, 23 Feb 2023 09:50:43 +0000 (09:50 +0000)
committerPaul Durrant <pdurrant@amazon.com>
Thu, 23 Mar 2023 16:50:05 +0000 (16:50 +0000)
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>
Amended commit comment. Fixed whitespace.

Signed-off-by: Paul Durrant <paul@xen.org>
30 files changed:
LICENSE
include/ethernet.h
include/store_interface.h
include/suspend_interface.h
include/tcpip.h
include/vif_interface.h
include/xen-types.h
include/xen-version.h
include/xen-warnings.h
include/xen.h
src/coinst/coinst.c
src/coinst/xennet_coinst.def
src/coinst/xennet_coinst.rc
src/xennet.inf
src/xennet/adapter.c
src/xennet/adapter.h
src/xennet/assert.h
src/xennet/dbg_print.h
src/xennet/driver.c
src/xennet/driver.h
src/xennet/miniport.c
src/xennet/miniport.h
src/xennet/receiver.c
src/xennet/receiver.h
src/xennet/string.c
src/xennet/string.h
src/xennet/transmitter.c
src/xennet/transmitter.h
src/xennet/util.h
src/xennet/xennet.rc

diff --git a/LICENSE b/LICENSE
index 00be66607d13ddbf1b4ae00eee762b98c60bacdb..c445255ced3c2a904684093146af602b51109c54 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 9eb4b74c167198851ee9612ab88170a3135a6856..05f631fdfe7f913a49cfde1cf93b488340b00f8c 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 e1251dd1369f7ca20f7acb5e5ec9ed347cce363c..e6b9bce038605d0e8488457e1aead162031046a8 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 cbe11ab6d9e4f4ad21ac54f0edbc6483728a577c..8d6f40fdaf782a022fe474824ca28584c7755d23 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 7d1dade5ae80af257d58192f341b1efbb536ee9c..4869c8531720c59f268ba210ba4be4e86f0342ad 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 a600d35e8f232344abedf8bf9adfede387c15e53..a63abba726b17be4346931262ae1d7f258f6a663 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 82cb69ea9a51f3c98fa5c9f1b542f265bbad2533..6eb869311afce6831aff45df8d48ba2bfa883ce3 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 4da807a2940781426c4b1331e280dfc16aa174c7..224ca8873dc85f5bcc59ba84fb1ae06c1e74aeda 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 90ae6ae5477076a623b2a5ed6389c7d68fab1084..30c0f7da8337d0c3e01ba6bba4adc58abceefa65 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 27c115c304d5c02ce886f64720d28bf16333a17d..2cee2665df6fd5d89995c16ef59216268537977a 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 89547cc352fdba5ec59f7d604f0375b4af0d5700..f25c0f58ad6d8166c389e49f054c70faf0f47ab4 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 bcdd28b646080113e46419fd8306ef3c5e9f65ac..3a3f0fbb046e35539749ecdee7132c276df4ebe3 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 c7170e96d0371039165bf3bc6e407bbc0a5d6a5a..e4635d4d261c0bb8788966bcbe9472daf1fc0daf 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 43c5573ce3ba4ce8c376c6a1b5cd9662dca98c76..27cb2e2edcfa49af60a4c4c6c9536518b70fa9b5 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 4b449f3aa9edc922b78f4b24f64e3254d1b91ebb..67ced3e37b521357d255783d6ae85f134b5129be 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 db7128770af5b1137d34a552439eddf972a1f750..2ea034597ca31e6b79bdd4ffcd3490e408b7e036 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 f090461cde4fff9a22a768fc4a9b48a49c66cceb..53c8061ad5f6ddde4007637279c3a0abcd5a760b 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 3f33319fd1e51e6232a041b21dca18c6c56394c0..ff24dc810c4218b3be55d271cbbbeab814543bd8 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 8127621e363346501f10de933d75d7ffe60fa99f..96adde780e53646e5ac812b9d347f1332ea6a28c 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 2c5bb580126cded1c87b60bf116483aef7f5df7c..1c167c6cd2fd129bbb596bd6d21731108de6eed4 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 f7149094ef893e161256bb7574822acd76dc7d03..5dc98583ac93c029cb44b3c9472410d771d2aca5 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 15d445578f6f43017895dd51156dd69080ae14e0..16e93953db80447846b4362cdd77617b1715ac45 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 ae9207cccfb750432e5f4c91d03539a9fac530fb..b4cf4f0b726fef6c09b4407ccb76e75d71370684 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 5a1e82ea1592ab3fec739472bed83f1007101844..d8b8c84a76122776dd477e848857bc9ee70bc3e8 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 cc3b8d5ed94c542a699ad1c79c1f2916e57bedad..03a96ce46d2a360045388a08aaba22d992c25556 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 bd178b371888f9e0c014c71bbb352398545daf5f..5507a1a4c61ed86b175b54a87e1f87fa70b48e77 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 585c5ace4c23868849d4cc1e3a8232deb07af8fb..97d2f744ce4df7dcdf9bd59a78d99055fb1747e9 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 2dede97a882b38b30dc4db27db1e82c65795cf1f..bd980b144be0a00f4f68cc0f4ca2f1b2e52b2e31 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 62c3cf7dbe50d8d893a9d61b21cb6fcea97993a7..48b24ae08d7dab212c56daf5d53a6d346a9cf438 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,