git config --global --list komutuyla kullanici bilgileri gozden gecirilir.
git commit . --signoff komutuyla tum degisikler commit edilirken imzanin da eklenmesi saglanir.
Acilan yeni bencerede ilk satir PATCH Basligi olacak sekilde kisaca yazilir. Toolun kendisi [PATCH] seklinde basliga eklentilerini kendisi yapmaktadir. Sonra patch anlatan body kismi eklenir. signoff alaninin altta kalmasina ozen gosterilir.
Degisiklikler kaydedilip cikildiginda lokal repomuza degisikler commit edilmis olunur. Artik HEAD den patch cikarabiliriz.
git format-patch -1 HEAD komutuyla HEAD gosterdigi yerden 1 adet patch cikarilir.
According to the documentation link above, the -1 flag tells git how many commits should be included in the patch;
-<n>
Prepare patches from the topmost commits.
Baska bir sistemde ilgili patch uygun brancha ve commite asagidaki komutla merge edilebilir.
git am <patch_file_name> commit de olusturur. git apply <patch_file_name> sadece merge eder. commit girilmez.
Örnek PACH dosyasi
From 3c3df6a6a8f25997e9168a9bf201661e126e6d74 Mon Sep 17 00:00:00 2001
From: HAKKI KURUMAHMUT <kurumahmut@gmail.com>
Date: Tue, 7 May 2019 10:29:26 +0300
Subject: [PATCH] Scripts: Fix for Parsing DMAR Region under Reserved
Section While kernel command parameters are intel_iommu=on intremap=on at
some machines, cat /proc/iomem shows DMAR region under reserved section.
This patch must be done for config creation to complete because of
generating DMAR region not found error although it exist. If this patch is
not apply, below error is throw by "config create" command whether
intel_iommu On or Off because "reserved" regions are currently excluded from
the generated config although DMAR region exists. Thus, DMAR under reserved
section must be parsed by parser.
Signed-off-by: HAKKI KURUMAHMUT <kurumahmut@gmail.com>
---
pyjailhouse/sysfs_parser.py | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/pyjailhouse/sysfs_parser.py b/pyjailhouse/sysfs_parser.py
index 46c95fc2..0bbd2ba9 100644
--- a/pyjailhouse/sysfs_parser.py
+++ b/pyjailhouse/sysfs_parser.py
@@ -94,14 +94,14 @@ def input_listdir(dir, wildcards):
def parse_iomem(pcidevices):
- regions = IOMemRegionTree.parse_iomem_tree(
+ dmar_regions = []
+ (regions, dmar_regions) = IOMemRegionTree.parse_iomem_tree(
IOMemRegionTree.parse_iomem_file())
rom_region = MemRegion(0xc0000, 0xdffff, 'ROMs')
add_rom_region = False
ret = []
- dmar_regions = []
for r in regions:
append_r = True
# filter the list for MSI-X pages
@@ -860,21 +860,21 @@ class IOMemRegionTree:
return root
- # find HPET regions in tree
+ # find specific regions in tree
@staticmethod
- def find_hpet_regions(tree):
+ def find_regions_by_name(tree, string):
regions = []
for tree in tree.children:
r = tree.region
s = r.typestr
- if (s.find('HPET') >= 0):
+ if (s.find(string) >= 0):
regions.append(r)
# if the tree continues recurse further down ...
if (len(tree.children) > 0):
- regions.extend(IOMemRegionTree.find_hpet_regions(tree))
+ regions.extend(IOMemRegionTree.find_regions_by_name(tree, string))
return regions
@@ -882,6 +882,7 @@ class IOMemRegionTree:
@staticmethod
def parse_iomem_tree(tree):
regions = []
+ dmar_regions = []
for tree in tree.children:
r = tree.region
@@ -901,20 +902,23 @@ class IOMemRegionTree:
):
continue
- # generally blacklisted, unless we find an HPET behind it
+ # generally blacklisted, with a few exceptions
if (s.lower() == 'reserved'):
- regions.extend(IOMemRegionTree.find_hpet_regions(tree))
+ regions.extend(IOMemRegionTree.find_regions_by_name(tree, 'HPET'))
+ dmar_regions.extend(IOMemRegionTree.find_regions_by_name(tree, 'dmar'))
continue
# if the tree continues recurse further down ...
if (len(tree.children) > 0):
- regions.extend(IOMemRegionTree.parse_iomem_tree(tree))
+ (temp_regions, temp_dmar_regions) = IOMemRegionTree.parse_iomem_tree(tree)
+ regions.extend(temp_regions)
+ dmar_regions.extend(temp_dmar_regions)
continue
# add all remaining leaves
regions.append(r)
- return regions
+ return regions, dmar_regions
class IOMMUConfig:
--
2.17.1