Skip to content

Commit 50066cf

Browse files
committed
misc: Replace all remaining instances of 'cgminer' with 'sgminer'.
sed again.
1 parent 6ea3b93 commit 50066cf

15 files changed

+83
-83
lines changed

MCast.class

0 Bytes
Binary file not shown.

MCast.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ static public void usAge()
5353
System.err.println("usAge: java MCast [-v] [code [toaddr [port [replyport [wait]]]]]");
5454
System.err.println(" -v=report elapsed ms to last reply");
5555
System.err.println(" Anything below missing or blank will use it's default");
56-
System.err.println(" code=X in cgminer-X-Port default="+MCAST_CODE);
56+
System.err.println(" code=X in sgminer-X-Port default="+MCAST_CODE);
5757
System.err.println(" toaddr=multicast address default="+MCAST_ADDR);
5858
System.err.println(" port=multicast port default="+MCAST_PORT);
5959
System.err.println(" replyport=local post to listen for replies default="+MCAST_REPORT);
@@ -188,7 +188,7 @@ public void sendMCast()
188188
{
189189
try
190190
{
191-
String message = new String("cgminer-" + code + "-" + report);
191+
String message = new String("sgminer-" + code + "-" + report);
192192
MulticastSocket socket = null;
193193
DatagramPacket packet = null;
194194

adl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,7 @@ int gpu_fanpercent(int gpu)
790790
/* Recursive calling applog causes a hang, so disable messages */
791791
applog(LOG_WARNING, "GPU %d stopped reporting fanspeed due to driver corruption", gpu);
792792
if (opt_restart) {
793-
applog(LOG_WARNING, "Restart enabled, will attempt to restart cgminer");
793+
applog(LOG_WARNING, "Restart enabled, will attempt to restart sgminer");
794794
applog(LOG_WARNING, "You can disable this with the --no-restart option");
795795
app_restart();
796796
}

api-example.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*/
99

1010
/* Compile:
11-
* gcc api-example.c -Icompat/jansson-2.5 -Icompat/libusb-1.0/libusb -o cgminer-api
11+
* gcc api-example.c -Icompat/jansson-2.5 -Icompat/libusb-1.0/libusb -o sgminer-api
1212
*/
1313

1414
#include "config.h"

api-example.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
#
3-
# Sample Socket I/O to CGMiner API
3+
# Sample Socket I/O to sgminer API
44
#
55
function getsock($addr, $port)
66
{

api-example.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Foundation; either version 3 of the License, or (at your option) any later
88
# version. See COPYING for more details.
99

10-
#Short Python Example for connecting to The Cgminer API
10+
#Short Python Example for connecting to The sgminer API
1111
#Written By: setkeh <https://github.com/setkeh>
1212
#Thanks to Jezzz for all his Support.
1313
#NOTE: When adding a param with a pipe | in bash or ZSH you must wrap the arg in quotes

api.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ struct CODES {
379379
{ SEVERITY_ERR, MSG_NOGPUADL,PARAM_GPU, "GPU %d does not have ADL" },
380380
{ SEVERITY_ERR, MSG_INVINT, PARAM_STR, "Invalid intensity (%s) - must be '" _DYNAMIC "' or range " MIN_INTENSITY_STR " - " MAX_INTENSITY_STR },
381381
{ SEVERITY_INFO, MSG_GPUINT, PARAM_BOTH, "GPU %d set new intensity to %s" },
382-
{ SEVERITY_SUCC, MSG_MINECONFIG,PARAM_NONE, "CGMiner config" },
382+
{ SEVERITY_SUCC, MSG_MINECONFIG,PARAM_NONE, "sgminer config" },
383383
{ SEVERITY_ERR, MSG_GPUMERR, PARAM_BOTH, "Setting GPU %d memoryclock to (%s) reported failure" },
384384
{ SEVERITY_SUCC, MSG_GPUMEM, PARAM_BOTH, "Setting GPU %d memoryclock to (%s) reported success" },
385385
{ SEVERITY_ERR, MSG_GPUEERR, PARAM_BOTH, "Setting GPU %d clock to (%s) reported failure" },
@@ -409,13 +409,13 @@ struct CODES {
409409
{ SEVERITY_SUCC, MSG_REMPOOL, PARAM_BOTH, "Removed pool %d:'%s'" },
410410
{ SEVERITY_SUCC, MSG_NOTIFY, PARAM_NONE, "Notify" },
411411
{ SEVERITY_SUCC, MSG_DEVDETAILS,PARAM_NONE, "Device Details" },
412-
{ SEVERITY_SUCC, MSG_MINESTATS,PARAM_NONE, "CGMiner stats" },
412+
{ SEVERITY_SUCC, MSG_MINESTATS,PARAM_NONE, "sgminer stats" },
413413
{ SEVERITY_ERR, MSG_MISCHK, PARAM_NONE, "Missing check cmd" },
414414
{ SEVERITY_SUCC, MSG_CHECK, PARAM_NONE, "Check command" },
415415
{ SEVERITY_ERR, MSG_MISBOOL, PARAM_NONE, "Missing parameter: true/false" },
416416
{ SEVERITY_ERR, MSG_INVBOOL, PARAM_NONE, "Invalid parameter should be true or false" },
417417
{ SEVERITY_SUCC, MSG_FOO, PARAM_BOOL, "Failover-Only set to %s" },
418-
{ SEVERITY_SUCC, MSG_MINECOIN,PARAM_NONE, "CGMiner coin" },
418+
{ SEVERITY_SUCC, MSG_MINECOIN,PARAM_NONE, "sgminer coin" },
419419
{ SEVERITY_SUCC, MSG_DEBUGSET,PARAM_NONE, "Debug settings" },
420420
{ SEVERITY_SUCC, MSG_SETCONFIG,PARAM_SET, "Set config '%s' to %d" },
421421
{ SEVERITY_ERR, MSG_UNKCON, PARAM_STR, "Unknown config '%s'" },
@@ -2197,7 +2197,7 @@ static void poolpriority(struct io_data *io_data, __maybe_unused SOCKETTYPE c, c
21972197
char *ptr, *next;
21982198
int i, pr, prio = 0;
21992199

2200-
// TODO: all cgminer code needs a mutex added everywhere for change
2200+
// TODO: all sgminer code needs a mutex added everywhere for change
22012201
// access to total_pools and also parts of the pools[] array,
22022202
// just copying total_pools here wont solve that
22032203

@@ -2725,7 +2725,7 @@ void dosave(struct io_data *io_data, __maybe_unused SOCKETTYPE c, char *param, b
27252725
ptr = NULL;
27262726
}
27272727

2728-
static int itemstats(struct io_data *io_data, int i, char *id, struct cgminer_stats *stats, struct cgminer_pool_stats *pool_stats, struct api_data *extra, struct cgpu_info *cgpu, bool isjson)
2728+
static int itemstats(struct io_data *io_data, int i, char *id, struct sgminer_stats *stats, struct sgminer_pool_stats *pool_stats, struct api_data *extra, struct cgpu_info *cgpu, bool isjson)
27292729
{
27302730
struct api_data *root = NULL;
27312731
char buf[TMPBUFSIZ];
@@ -2795,15 +2795,15 @@ static void minerstats(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __m
27952795
extra = NULL;
27962796

27972797
sprintf(id, "%s%d", cgpu->drv->name, cgpu->device_id);
2798-
i = itemstats(io_data, i, id, &(cgpu->cgminer_stats), NULL, extra, cgpu, isjson);
2798+
i = itemstats(io_data, i, id, &(cgpu->sgminer_stats), NULL, extra, cgpu, isjson);
27992799
}
28002800
}
28012801

28022802
for (j = 0; j < total_pools; j++) {
28032803
struct pool *pool = pools[j];
28042804

28052805
sprintf(id, "POOL%d", j);
2806-
i = itemstats(io_data, i, id, &(pool->cgminer_stats), &(pool->cgminer_pool_stats), NULL, NULL, isjson);
2806+
i = itemstats(io_data, i, id, &(pool->sgminer_stats), &(pool->sgminer_pool_stats), NULL, NULL, isjson);
28072807
}
28082808

28092809
if (isjson && io_open)
@@ -3437,7 +3437,7 @@ static void *quit_thread(__maybe_unused void *userdata)
34373437
mutex_unlock(&quit_restart_lock);
34383438

34393439
if (opt_debug)
3440-
applog(LOG_DEBUG, "API: killing cgminer");
3440+
applog(LOG_DEBUG, "API: killing sgminer");
34413441

34423442
kill_work();
34433443

@@ -3451,7 +3451,7 @@ static void *restart_thread(__maybe_unused void *userdata)
34513451
mutex_unlock(&quit_restart_lock);
34523452

34533453
if (opt_debug)
3454-
applog(LOG_DEBUG, "API: restarting cgminer");
3454+
applog(LOG_DEBUG, "API: restarting sgminer");
34553455

34563456
app_restart();
34573457

@@ -3503,7 +3503,7 @@ static void mcast()
35033503
bool addrok;
35043504
char group;
35053505

3506-
char expect[] = "cgminer-"; // first 8 bytes constant
3506+
char expect[] = "sgminer-"; // first 8 bytes constant
35073507
char *expect_code;
35083508
size_t expect_code_len;
35093509
char buf[1024];

bench_block.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define __BENCH_BLOCK_H__ 1
33

44
// Random work pulled from a pool
5-
#define CGMINER_BENCHMARK_BLOCK \
5+
#define SGMINER_BENCHMARK_BLOCK \
66
0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0xD8, 0x07, 0x17, 0xC9, 0x13, 0x6F, 0xDC, 0xBE, 0xDE, 0xB7, \
77
0xB2, 0x14, 0xEF, 0xD1, 0x72, 0x7F, 0xA3, 0x72, 0xB2, 0x5D, 0x88, 0xF0, 0x00, 0x00, 0x05, 0xAA, \
88
0x00, 0x00, 0x00, 0x00, 0x92, 0x8B, 0x4C, 0x77, 0xF5, 0xB2, 0xE6, 0x56, 0x96, 0x27, 0xE0, 0x66, \

driver-opencl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1119,7 +1119,7 @@ static bool opencl_thread_prepare(struct thr_info *thr)
11191119
applog(LOG_ERR, "Failed to init GPU thread %d, disabling device %d", i, gpu);
11201120
if (!failmessage) {
11211121
applog(LOG_ERR, "Restarting the GPU from the menu will not fix this.");
1122-
applog(LOG_ERR, "Try restarting cgminer.");
1122+
applog(LOG_ERR, "Try restarting sgminer.");
11231123
failmessage = true;
11241124
#ifdef HAVE_CURSES
11251125
char *buf;

miner.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -403,15 +403,15 @@ enum dev_reason {
403403

404404
#define MIN_SEC_UNSET 99999999
405405

406-
struct cgminer_stats {
406+
struct sgminer_stats {
407407
uint32_t getwork_calls;
408408
struct timeval getwork_wait;
409409
struct timeval getwork_wait_max;
410410
struct timeval getwork_wait_min;
411411
};
412412

413413
// Just the actual network getworks to the pool
414-
struct cgminer_pool_stats {
414+
struct sgminer_pool_stats {
415415
uint32_t getwork_calls;
416416
uint32_t getwork_attempts;
417417
struct timeval getwork_wait;
@@ -436,7 +436,7 @@ struct cgminer_pool_stats {
436436
};
437437

438438
struct cgpu_info {
439-
int cgminer_id;
439+
int sgminer_id;
440440
struct device_drv *drv;
441441
int device_id;
442442
char *name;
@@ -517,7 +517,7 @@ struct cgpu_info {
517517
int dev_comms_error_count;
518518
int dev_throttle_count;
519519

520-
struct cgminer_stats cgminer_stats;
520+
struct sgminer_stats sgminer_stats;
521521

522522
pthread_rwlock_t qlock;
523523
struct work *queued_work;
@@ -951,7 +951,7 @@ extern bool opt_protocol;
951951
extern bool have_longpoll;
952952
extern char *opt_kernel_path;
953953
extern char *opt_socks_proxy;
954-
extern char *cgminer_path;
954+
extern char *sgminer_path;
955955
extern bool opt_fail_only;
956956
extern bool opt_autofan;
957957
extern bool opt_autoengine;
@@ -1214,8 +1214,8 @@ struct pool {
12141214
double last_share_diff;
12151215
uint64_t best_diff;
12161216

1217-
struct cgminer_stats cgminer_stats;
1218-
struct cgminer_pool_stats cgminer_pool_stats;
1217+
struct sgminer_stats sgminer_stats;
1218+
struct sgminer_pool_stats sgminer_pool_stats;
12191219

12201220
/* The last block this particular pool knows about */
12211221
char prev_block[32];

miner.php

+11-11
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
$title = 'Mine';
2323
#
2424
# Set $readonly to true to force miner.php to be readonly
25-
# Set $readonly to false then it will check cgminer 'privileged'
25+
# Set $readonly to false then it will check sgminer 'privileged'
2626
$readonly = false;
2727
#
2828
# Set $userlist to null to allow anyone access or read API-README
@@ -44,7 +44,7 @@
4444
# N.B. also if $readonly is true, it will not display the fields
4545
$poolinputs = false;
4646
#
47-
# Set $rigs to an array of your cgminer rigs that are running
47+
# Set $rigs to an array of your sgminer rigs that are running
4848
# format: 'IP:Port' or 'Host:Port' or 'Host:Port:Name'
4949
$rigs = array('127.0.0.1:4028');
5050
#
@@ -54,16 +54,16 @@
5454
# Set $mcastexpect to at least how many rigs you expect it to find
5555
$mcastexpect = 0;
5656
#
57-
# API Multicast address all cgminers are listening on
57+
# API Multicast address all sgminers are listening on
5858
$mcastaddr = '224.0.0.75';
5959
#
60-
# API Multicast UDP port all cgminers are listening on
60+
# API Multicast UDP port all sgminers are listening on
6161
$mcastport = 4028;
6262
#
63-
# The code all cgminers expect in the Multicast message sent
63+
# The code all sgminers expect in the Multicast message sent
6464
$mcastcode = 'FTW';
6565
#
66-
# UDP port cgminers are to reply on (by request)
66+
# UDP port sgminers are to reply on (by request)
6767
$mcastlistport = 4027;
6868
#
6969
# Set $mcasttimeout to the number of seconds (floating point)
@@ -437,7 +437,7 @@ function mcastrigs()
437437
return;
438438
}
439439

440-
$buf = "cgminer-$mcastcode-$mcastlistport";
440+
$buf = "sgminer-$mcastcode-$mcastlistport";
441441
socket_sendto($mcast_soc, $buf, strlen($buf), 0, $mcastaddr, $mcastport);
442442
socket_close($mcast_soc);
443443

@@ -1569,7 +1569,7 @@ function rigbutton($rig, $rigname, $when, $row)
15691569
#
15701570
function showrigs($anss, $headname, $rigname)
15711571
{
1572-
$dthead = array($headname => 1, 'STATUS' => 1, 'Description' => 1, 'When' => 1, 'API' => 1, 'CGMiner' => 1);
1572+
$dthead = array($headname => 1, 'STATUS' => 1, 'Description' => 1, 'When' => 1, 'API' => 1, 'sgminer' => 1);
15731573
showhead('', $dthead);
15741574

15751575
foreach ($anss as $rig => $ans)
@@ -1850,8 +1850,8 @@ function pagebuttons($rig, $pg)
18501850
$rg = '';
18511851
if (count($rigs) > 1)
18521852
$rg = " Rig $rig";
1853-
echo "<input type=button value='Restart' onclick='prc(\"restart&rig=$rig\",\"Restart CGMiner$rg\")'>";
1854-
echo "&nbsp;<input type=button value='Quit' onclick='prc(\"quit&rig=$rig\",\"Quit CGMiner$rg\")'>";
1853+
echo "<input type=button value='Restart' onclick='prc(\"restart&rig=$rig\",\"Restart sgminer$rg\")'>";
1854+
echo "&nbsp;<input type=button value='Quit' onclick='prc(\"quit&rig=$rig\",\"Quit sgminer$rg\")'>";
18551855
}
18561856
refreshbuttons();
18571857
if (isset($_SESSION[$ses]))
@@ -1881,7 +1881,7 @@ function doOne($rig, $preprocess)
18811881
if ($notify)
18821882
$cmds['notify'] = 'device status';
18831883

1884-
$cmds['config'] = 'cgminer config';
1884+
$cmds['config'] = 'sgminer config';
18851885

18861886
process($cmds, $rig);
18871887

ocl.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ char *file_contents(const char *filename, int *length)
4747
/* Try in the optional kernel path or installed prefix first */
4848
f = fopen(fullpath, "rb");
4949
if (!f) {
50-
/* Then try from the path cgminer was called */
51-
strcpy(fullpath, cgminer_path);
50+
/* Then try from the path sgminer was called */
51+
strcpy(fullpath, sgminer_path);
5252
strcat(fullpath, filename);
5353
f = fopen(fullpath, "rb");
5454
}

0 commit comments

Comments
 (0)