[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XENHID PATCH 3/3] Scripted replacement of Copyright notices in source



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@xxxxxxxxxx>

Manually fixed whitespace at end of files.

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 LICENSE                      | 3 ++-
 include/hid_interface.h      | 3 ++-
 include/store_interface.h    | 3 ++-
 include/suspend_interface.h  | 3 ++-
 src/coinst/coinst.c          | 3 ++-
 src/coinst/xenhid_coinst.def | 3 ++-
 src/coinst/xenhid_coinst.rc  | 5 +++--
 src/xenhid.inf               | 3 ++-
 src/xenhid/assert.h          | 3 ++-
 src/xenhid/dbg_print.h       | 3 ++-
 src/xenhid/driver.c          | 3 ++-
 src/xenhid/driver.h          | 3 ++-
 src/xenhid/fdo.c             | 3 ++-
 src/xenhid/fdo.h             | 3 ++-
 src/xenhid/names.h           | 3 ++-
 src/xenhid/string.c          | 3 ++-
 src/xenhid/string.h          | 3 ++-
 src/xenhid/thread.c          | 3 ++-
 src/xenhid/thread.h          | 3 ++-
 src/xenhid/types.h           | 3 ++-
 src/xenhid/util.h            | 3 ++-
 src/xenhid/xenhid.rc         | 3 ++-
 22 files changed, 45 insertions(+), 23 deletions(-)

diff --git a/LICENSE b/LICENSE
index df521f1..b35096e 100644
--- 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,
diff --git a/include/hid_interface.h b/include/hid_interface.h
index 93a8851..2e2d9e6 100644
--- a/include/hid_interface.h
+++ b/include/hid_interface.h
@@ -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, 
diff --git a/include/store_interface.h b/include/store_interface.h
index 83fed17..616bc36 100644
--- a/include/store_interface.h
+++ b/include/store_interface.h
@@ -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,
diff --git a/include/suspend_interface.h b/include/suspend_interface.h
index 9ef386b..ee31d95 100644
--- a/include/suspend_interface.h
+++ b/include/suspend_interface.h
@@ -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,
diff --git a/src/coinst/coinst.c b/src/coinst/coinst.c
index aec1ae9..2e2e2fa 100644
--- a/src/coinst/coinst.c
+++ b/src/coinst/coinst.c
@@ -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, 
diff --git a/src/coinst/xenhid_coinst.def b/src/coinst/xenhid_coinst.def
index df65c7f..71d8f65 100644
--- a/src/coinst/xenhid_coinst.def
+++ b/src/coinst/xenhid_coinst.def
@@ -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, 
diff --git a/src/coinst/xenhid_coinst.rc b/src/coinst/xenhid_coinst.rc
index fc2c4d5..f9dba02 100644
--- a/src/coinst/xenhid_coinst.rc
+++ b/src/coinst/xenhid_coinst.rc
@@ -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"
diff --git a/src/xenhid.inf b/src/xenhid.inf
index e42ebb2..94b0bec 100644
--- a/src/xenhid.inf
+++ b/src/xenhid.inf
@@ -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, 
diff --git a/src/xenhid/assert.h b/src/xenhid/assert.h
index def95a2..913938d 100644
--- a/src/xenhid/assert.h
+++ b/src/xenhid/assert.h
@@ -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, 
diff --git a/src/xenhid/dbg_print.h b/src/xenhid/dbg_print.h
index 5686407..5dab9e5 100644
--- a/src/xenhid/dbg_print.h
+++ b/src/xenhid/dbg_print.h
@@ -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, 
diff --git a/src/xenhid/driver.c b/src/xenhid/driver.c
index 9436518..fb655b0 100644
--- a/src/xenhid/driver.c
+++ b/src/xenhid/driver.c
@@ -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, 
diff --git a/src/xenhid/driver.h b/src/xenhid/driver.h
index 6202017..093ad0d 100644
--- a/src/xenhid/driver.h
+++ b/src/xenhid/driver.h
@@ -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, 
diff --git a/src/xenhid/fdo.c b/src/xenhid/fdo.c
index 1df6900..7111ba6 100644
--- a/src/xenhid/fdo.c
+++ b/src/xenhid/fdo.c
@@ -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, 
diff --git a/src/xenhid/fdo.h b/src/xenhid/fdo.h
index f88fc24..1a8931d 100644
--- a/src/xenhid/fdo.h
+++ b/src/xenhid/fdo.h
@@ -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, 
diff --git a/src/xenhid/names.h b/src/xenhid/names.h
index a2d9c15..be36847 100644
--- a/src/xenhid/names.h
+++ b/src/xenhid/names.h
@@ -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,
diff --git a/src/xenhid/string.c b/src/xenhid/string.c
index 7d2f1e3..e0e22a7 100644
--- a/src/xenhid/string.c
+++ b/src/xenhid/string.c
@@ -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,
diff --git a/src/xenhid/string.h b/src/xenhid/string.h
index 389239e..6276fd9 100644
--- a/src/xenhid/string.h
+++ b/src/xenhid/string.h
@@ -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,
diff --git a/src/xenhid/thread.c b/src/xenhid/thread.c
index f643156..43266be 100644
--- a/src/xenhid/thread.c
+++ b/src/xenhid/thread.c
@@ -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,
diff --git a/src/xenhid/thread.h b/src/xenhid/thread.h
index 097532d..5373c34 100644
--- a/src/xenhid/thread.h
+++ b/src/xenhid/thread.h
@@ -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,
diff --git a/src/xenhid/types.h b/src/xenhid/types.h
index 2517c47..0194171 100644
--- a/src/xenhid/types.h
+++ b/src/xenhid/types.h
@@ -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, 
diff --git a/src/xenhid/util.h b/src/xenhid/util.h
index 977e362..9ec9d71 100644
--- a/src/xenhid/util.h
+++ b/src/xenhid/util.h
@@ -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,
diff --git a/src/xenhid/xenhid.rc b/src/xenhid/xenhid.rc
index 008da30..63ea819 100644
--- a/src/xenhid/xenhid.rc
+++ b/src/xenhid/xenhid.rc
@@ -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, 
-- 
2.39.0.windows.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.