-/*
- * crash-manager
+/* This file is part of libcrash-manager
*
- * Copyright (c) 2016-2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2016-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
*/
-
#include <assert.h>
#include <ctype.h>
#include <dirent.h>
-/*
- * crash-manager
+/* This file is part of crash manager
*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2019-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
*/
-
-#ifndef __CRASH_MANAGER_H__
-#define __CRASH_MANAGER_H__
+#pragma once
#include <sys/types.h>
#include <unistd.h>
void crash_manager_free(struct crash_info *cinfo);
void crash_info_init(struct crash_info *cinfo);
void free_crash_info(struct crash_info *cinfo);
-
-#endif
-/*
- * crash-popup: request showing crash-popup via d-bus
+/* crash-popup: request showing crash-popup via d-bus
* This utility is separate exececutable to limit crash-manager dependencies.
*
* Copyright (c) 2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * SPDX-License-Identifier: MIT
*/
-
#define LOG_TAG "CRASH_MANAGER"
#include "shared/log.h"
#include "dbus-util.h"
-/*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+/* This file is part of crash-manager
*
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2019-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
*/
-
#pragma once
#include "shared/log.h"
-/*
- * Copyright (c) 2016-2019 Samsung Electronics Co., Ltd.
+/* Broadcast crash info via D-Bus
+ * This utility is separate exececutable to limit crash-manager dependencies
*
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Authors: Mateusz Moscicki <m.moscicki2@partner.samsung.com>
- * Karol Lewandowski <k.lewandowsk@samsung.com>
+ * Copyright (c) 2016-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
*/
-
#define LOG_TAG "CRASH_MANAGER"
#include "shared/log.h"
#include "dbus-util.h"
+/* Standalone crash-manager program
+ * This program is supposed to be invoked directly by kernel (via kernel.core_patter= mechanism)
+ *
+ * Copyright (c) 2016-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
+ */
#include <diagnostics.h>
#include <getopt.h>
#include <grp.h>
-/*
- * build-ids
- *
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/* Collect metadata about crashed program using rpm db
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2018-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
*/
-
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
-/*
- * build-ids
+/* This file is part of crash-manager
*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2018-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
*/
-
-#ifndef __SO_INFO_H__
-#define __SO_INFO_H__
+#pragma once
void get_and_save_so_info(char *map_filename, char *out_file);
GHashTable *get_app_name_from_map(char *map_path);
-#endif
-/*
- * bugreport-util
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+/* bugreport-util: Helper to send bugreport events
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
*/
-
#include <diagnostics.h>
#include <stdlib.h>
#include <unistd.h>
bundle_free(event_data);
return res == DIAGNOSTICS_ERROR_NONE;
}
-
-/*
- * bugreport-util
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+/* This file is part of crash-manager
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
*/
-#ifndef __BUGREPORT_UTIL_H__
-#define __BUGREPORT_UTIL_H__
+#pragma once
+
#include <stdbool.h>
bool send_bugreport_created_event(const char *report_path);
-
-#endif // __BUGREPORT_UTIL_H__
-/*
- * crash-manager
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+/* Config file handling support
*
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2019-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
*/
#include <assert.h>
#include <dirent.h>
-/*
- * crash-manager
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+/* This file is part of crash-manager
*
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2019-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
*/
-#ifndef __DEF_CONFIG_H_
-#define __DEF_CONFIG_H_
+#pragma once
#include <stdbool.h>
#ifdef __cplusplus
}
#endif
-
-/**
- * @}
- */
-#endif
-/*
- * crash-manager
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+/* This file is part of crash-manager
*
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2012-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
*/
-
-#ifndef __CRASH_LOG_H__
-#define __CRASH_LOG_H__
+#pragma once
#ifndef LOG_TAG
#define LOG_TAG "CRASH_MANAGER"
#define _I(fmt, arg...) do { if (DLOG_LOG_LEVEL <= DLOG_INFO) SLOGI(fmt, ##arg); } while (0)
#define _W(fmt, arg...) do { if (DLOG_LOG_LEVEL <= DLOG_WARN) SLOGW(fmt, ##arg); } while (0)
#define _E(fmt, arg...) do { if (DLOG_LOG_LEVEL <= DLOG_ERROR) SLOGE(fmt, ##arg); } while (0)
-
-#endif
-/* __CRASH_LOG_H__ */
/* Utilities for spawning sub-processes
*
- * Copyright (c) 2018-2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2018-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
*/
-
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
/* Utilities for spawning sub-processes
*
- * Copyright (c) 2018-2019 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2018-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
*/
-#ifndef __SPAWN_H__
-#define __SPAWN_H__
+#pragma once
#include <stdbool.h>
#include <sys/types.h>
#ifdef __cplusplus
}
#endif
-
-#endif
-/*
- * crash-manager
- * Copyright (c) 2012-2019 Samsung Electronics Co., Ltd.
+/* Misc. utility functions
*
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2012-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
*/
-
#include <assert.h>
#include <diagnostics.h>
#include <stdio.h>
-/*
- * crash-manager
- * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
+/* This file is part of crash-manager
*
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Copyright (c) 2012-2021 Samsung Electronics Co., Ltd.
+ * SPDX-License-Identifier: MIT
*/
-#ifndef __DEF_UTIL_H__
-#define __DEF_UTIL_H__
+#pragma once
#include <stdbool.h>
#include <sys/types.h>
bool write_to_file(const char *content, const char *base_dir, const char *file_name);
bool is_dotnet_file(const char *path);
+
#ifdef __cplusplus
}
#endif
-
-/**
- * @}
- */
-#endif